From 2a6f1bbbe529b8063f5ecded8da8427a59619780 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Apr 2026 15:51:37 -0700 Subject: [PATCH] fix(dataplex)!: remove deprecated Explore-related methods and messages from public client libraries Breaking Changes: Removed ContentService and all associated methods (CreateContent, UpdateContent, DeleteContent, GetContent, ListContent, etc.) and request/response messages. Removed Environment and Session management methods from DataplexService (CreateEnvironment, UpdateEnvironment, DeleteEnvironment, ListEnvironments, GetEnvironment, ListSessions) and their associated messages. feat(dataplex): add DataProductService to manage data products and underlying data assets feat(dataplex): add MetadataFeed to CatalogService for tracking metadata changes feat(dataplex): add LookupContext to CatalogService for LLM-generated resource context feat(dataplex): add support for attaching aspects to EntryLinks feat(dataplex): add UpdateEntryLink and LookupEntryLinks methods to CatalogService feat(dataplex): support OneTime triggers for DataScan operations feat(dataplex): add debug query support to Data Quality rules feat(dataplex): allow selective generation scope for Data Documentation scans feat(dataplex): add SKIPPED state to DataScan catalog publishing status docs(dataplex): remove deprecated metadata change warnings in Dataplex Catalog feat: Support Ruby v4.0 and deprecate support for v3.1 docs: update various comments --- .../.owlbot-manifest.json | 62 +- google-cloud-dataplex-v1/.owlbot.rb | 28 + google-cloud-dataplex-v1/Gemfile | 7 +- google-cloud-dataplex-v1/gapic_metadata.json | 120 +- .../google-cloud-dataplex-v1.gemspec | 2 +- .../lib/google/cloud/dataplex/v1.rb | 2 +- .../google/cloud/dataplex/v1/analyze_pb.rb | 27 +- .../cloud/dataplex/v1/business_glossary_pb.rb | 27 +- .../google/cloud/dataplex/v1/catalog_pb.rb | 46 +- .../dataplex/v1/catalog_service/client.rb | 954 +++++++++++++++- .../v1/catalog_service/credentials.rb | 5 +- .../dataplex/v1/catalog_service/paths.rb | 19 + .../v1/catalog_service/rest/client.rb | 898 ++++++++++++++- .../v1/catalog_service/rest/service_stub.rb | 492 ++++++++ .../cloud/dataplex/v1/catalog_services_pb.rb | 31 +- .../lib/google/cloud/dataplex/v1/cmek_pb.rb | 27 +- .../google/cloud/dataplex/v1/content_pb.rb | 41 +- .../cloud/dataplex/v1/content_services_pb.rb | 49 - .../cloud/dataplex/v1/data_discovery_pb.rb | 25 +- .../dataplex/v1/data_documentation_pb.rb | 28 +- ...ent_service.rb => data_product_service.rb} | 29 +- .../client.rb | 1004 +++++++++++------ .../credentials.rb | 6 +- .../v1/data_product_service/operations.rb | 841 ++++++++++++++ .../paths.rb | 47 +- .../rest.rb | 21 +- .../rest/client.rb | 966 ++++++++++------ .../data_product_service/rest/operations.rb | 954 ++++++++++++++++ .../rest/service_stub.rb | 394 ++++--- .../cloud/dataplex/v1/data_products_pb.rb | 48 + .../dataplex/v1/data_products_services_pb.rb | 65 ++ .../cloud/dataplex/v1/data_profile_pb.rb | 27 +- .../cloud/dataplex/v1/data_quality_pb.rb | 32 +- .../cloud/dataplex/v1/data_taxonomy_pb.rb | 28 +- .../dataplex/v1/dataplex_service/client.rb | 664 ----------- .../dataplex/v1/dataplex_service/paths.rb | 21 - .../v1/dataplex_service/rest/client.rb | 622 ---------- .../v1/dataplex_service/rest/service_stub.rb | 368 ------ .../cloud/dataplex/v1/datascans_common_pb.rb | 27 +- .../google/cloud/dataplex/v1/datascans_pb.rb | 32 +- .../lib/google/cloud/dataplex/v1/logs_pb.rb | 30 +- .../google/cloud/dataplex/v1/metadata_pb.rb | 26 +- .../google/cloud/dataplex/v1/processing_pb.rb | 29 +- .../google/cloud/dataplex/v1/resources_pb.rb | 27 +- .../lib/google/cloud/dataplex/v1/rest.rb | 2 +- .../google/cloud/dataplex/v1/security_pb.rb | 25 +- .../google/cloud/dataplex/v1/service_pb.rb | 41 +- .../cloud/dataplex/v1/service_services_pb.rb | 13 - .../lib/google/cloud/dataplex/v1/tasks_pb.rb | 27 +- .../proto_docs/google/api/client.rb | 178 ++- .../google/cloud/dataplex/v1/catalog.rb | 365 +++++- .../google/cloud/dataplex/v1/content.rb | 142 --- .../cloud/dataplex/v1/data_documentation.rb | 26 + .../google/cloud/dataplex/v1/data_products.rb | 520 +++++++++ .../google/cloud/dataplex/v1/data_quality.rb | 72 +- .../cloud/dataplex/v1/datascans_common.rb | 10 +- .../google/cloud/dataplex/v1/logs.rb | 3 + .../google/cloud/dataplex/v1/processing.rb | 23 +- .../google/cloud/dataplex/v1/service.rb | 148 --- .../create_metadata_feed.rb} | 20 +- .../delete_metadata_feed.rb} | 20 +- .../get_metadata_feed.rb} | 22 +- .../list_metadata_feeds.rb} | 22 +- .../lookup_context.rb} | 22 +- .../lookup_entry_links.rb} | 22 +- .../update_entry_link.rb} | 22 +- .../update_metadata_feed.rb} | 20 +- .../content_service/delete_content.rb | 47 - .../content_service/get_iam_policy.rb | 47 - .../content_service/set_iam_policy.rb | 47 - .../data_product_service/create_data_asset.rb | 54 + .../create_data_product.rb | 54 + .../data_product_service/delete_data_asset.rb | 54 + .../delete_data_product.rb | 54 + .../get_data_asset.rb} | 22 +- .../data_product_service/get_data_product.rb | 47 + .../list_data_assets.rb} | 22 +- .../list_data_products.rb} | 28 +- .../data_product_service/update_data_asset.rb | 54 + .../update_data_product.rb | 54 + ...pet_metadata_google.cloud.dataplex.v1.json | 874 ++++++++------ .../dataplex/v1/catalog_service_paths_test.rb | 12 + .../dataplex/v1/catalog_service_rest_test.rb | 450 ++++++++ .../cloud/dataplex/v1/catalog_service_test.rb | 525 +++++++++ .../dataplex/v1/content_service_rest_test.rb | 543 --------- .../cloud/dataplex/v1/content_service_test.rb | 597 ---------- .../data_product_service_operations_test.rb | 400 +++++++ ....rb => data_product_service_paths_test.rb} | 34 +- .../v1/data_product_service_rest_test.rb | 661 +++++++++++ .../dataplex/v1/data_product_service_test.rb | 782 +++++++++++++ .../v1/dataplex_service_paths_test.rb | 12 - .../dataplex/v1/dataplex_service_rest_test.rb | 336 ------ .../dataplex/v1/dataplex_service_test.rb | 397 ------- google-cloud-dataplex-v1/test/helper.rb | 1 + 94 files changed, 10963 insertions(+), 6208 deletions(-) create mode 100644 google-cloud-dataplex-v1/.owlbot.rb rename google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/{content_service.rb => data_product_service.rb} (51%) rename google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/{content_service => data_product_service}/client.rb (52%) rename google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/{content_service => data_product_service}/credentials.rb (91%) create mode 100644 google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/operations.rb rename google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/{content_service => data_product_service}/paths.rb (51%) rename google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/{content_service => data_product_service}/rest.rb (61%) rename google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/{content_service => data_product_service}/rest/client.rb (51%) create mode 100644 google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb rename google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/{content_service => data_product_service}/rest/service_stub.rb (65%) create mode 100644 google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_pb.rb create mode 100644 google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_services_pb.rb delete mode 100644 google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb create mode 100644 google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_products.rb rename google-cloud-dataplex-v1/snippets/{dataplex_service/update_environment.rb => catalog_service/create_metadata_feed.rb} (73%) rename google-cloud-dataplex-v1/snippets/{dataplex_service/create_environment.rb => catalog_service/delete_metadata_feed.rb} (73%) rename google-cloud-dataplex-v1/snippets/{content_service/update_content.rb => catalog_service/get_metadata_feed.rb} (70%) rename google-cloud-dataplex-v1/snippets/{dataplex_service/list_sessions.rb => catalog_service/list_metadata_feeds.rb} (69%) rename google-cloud-dataplex-v1/snippets/{content_service/create_content.rb => catalog_service/lookup_context.rb} (71%) rename google-cloud-dataplex-v1/snippets/{dataplex_service/list_environments.rb => catalog_service/lookup_entry_links.rb} (70%) rename google-cloud-dataplex-v1/snippets/{dataplex_service/get_environment.rb => catalog_service/update_entry_link.rb} (71%) rename google-cloud-dataplex-v1/snippets/{dataplex_service/delete_environment.rb => catalog_service/update_metadata_feed.rb} (73%) delete mode 100644 google-cloud-dataplex-v1/snippets/content_service/delete_content.rb delete mode 100644 google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb delete mode 100644 google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb create mode 100644 google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb create mode 100644 google-cloud-dataplex-v1/snippets/data_product_service/create_data_product.rb create mode 100644 google-cloud-dataplex-v1/snippets/data_product_service/delete_data_asset.rb create mode 100644 google-cloud-dataplex-v1/snippets/data_product_service/delete_data_product.rb rename google-cloud-dataplex-v1/snippets/{content_service/get_content.rb => data_product_service/get_data_asset.rb} (70%) create mode 100644 google-cloud-dataplex-v1/snippets/data_product_service/get_data_product.rb rename google-cloud-dataplex-v1/snippets/{content_service/list_content.rb => data_product_service/list_data_assets.rb} (69%) rename google-cloud-dataplex-v1/snippets/{content_service/test_iam_permissions.rb => data_product_service/list_data_products.rb} (60%) create mode 100644 google-cloud-dataplex-v1/snippets/data_product_service/update_data_asset.rb create mode 100644 google-cloud-dataplex-v1/snippets/data_product_service/update_data_product.rb delete mode 100644 google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb delete mode 100644 google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb create mode 100644 google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_operations_test.rb rename google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/{content_service_paths_test.rb => data_product_service_paths_test.rb} (51%) create mode 100644 google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_rest_test.rb create mode 100644 google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_test.rb diff --git a/google-cloud-dataplex-v1/.owlbot-manifest.json b/google-cloud-dataplex-v1/.owlbot-manifest.json index 3e1adde4ebe7..b1d4b5d8ee46 100644 --- a/google-cloud-dataplex-v1/.owlbot-manifest.json +++ b/google-cloud-dataplex-v1/.owlbot-manifest.json @@ -51,16 +51,20 @@ "lib/google/cloud/dataplex/v1/cmek_service/rest/service_stub.rb", "lib/google/cloud/dataplex/v1/cmek_services_pb.rb", "lib/google/cloud/dataplex/v1/content_pb.rb", - "lib/google/cloud/dataplex/v1/content_service.rb", - "lib/google/cloud/dataplex/v1/content_service/client.rb", - "lib/google/cloud/dataplex/v1/content_service/credentials.rb", - "lib/google/cloud/dataplex/v1/content_service/paths.rb", - "lib/google/cloud/dataplex/v1/content_service/rest.rb", - "lib/google/cloud/dataplex/v1/content_service/rest/client.rb", - "lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb", "lib/google/cloud/dataplex/v1/content_services_pb.rb", "lib/google/cloud/dataplex/v1/data_discovery_pb.rb", "lib/google/cloud/dataplex/v1/data_documentation_pb.rb", + "lib/google/cloud/dataplex/v1/data_product_service.rb", + "lib/google/cloud/dataplex/v1/data_product_service/client.rb", + "lib/google/cloud/dataplex/v1/data_product_service/credentials.rb", + "lib/google/cloud/dataplex/v1/data_product_service/operations.rb", + "lib/google/cloud/dataplex/v1/data_product_service/paths.rb", + "lib/google/cloud/dataplex/v1/data_product_service/rest.rb", + "lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb", + "lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb", + "lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb", + "lib/google/cloud/dataplex/v1/data_products_pb.rb", + "lib/google/cloud/dataplex/v1/data_products_services_pb.rb", "lib/google/cloud/dataplex/v1/data_profile_pb.rb", "lib/google/cloud/dataplex/v1/data_quality_pb.rb", "lib/google/cloud/dataplex/v1/data_scan_service.rb", @@ -123,9 +127,9 @@ "proto_docs/google/cloud/dataplex/v1/business_glossary.rb", "proto_docs/google/cloud/dataplex/v1/catalog.rb", "proto_docs/google/cloud/dataplex/v1/cmek.rb", - "proto_docs/google/cloud/dataplex/v1/content.rb", "proto_docs/google/cloud/dataplex/v1/data_discovery.rb", "proto_docs/google/cloud/dataplex/v1/data_documentation.rb", + "proto_docs/google/cloud/dataplex/v1/data_products.rb", "proto_docs/google/cloud/dataplex/v1/data_profile.rb", "proto_docs/google/cloud/dataplex/v1/data_quality.rb", "proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb", @@ -169,42 +173,52 @@ "snippets/catalog_service/create_entry_group.rb", "snippets/catalog_service/create_entry_link.rb", "snippets/catalog_service/create_entry_type.rb", + "snippets/catalog_service/create_metadata_feed.rb", "snippets/catalog_service/create_metadata_job.rb", "snippets/catalog_service/delete_aspect_type.rb", "snippets/catalog_service/delete_entry.rb", "snippets/catalog_service/delete_entry_group.rb", "snippets/catalog_service/delete_entry_link.rb", "snippets/catalog_service/delete_entry_type.rb", + "snippets/catalog_service/delete_metadata_feed.rb", "snippets/catalog_service/get_aspect_type.rb", "snippets/catalog_service/get_entry.rb", "snippets/catalog_service/get_entry_group.rb", "snippets/catalog_service/get_entry_link.rb", "snippets/catalog_service/get_entry_type.rb", + "snippets/catalog_service/get_metadata_feed.rb", "snippets/catalog_service/get_metadata_job.rb", "snippets/catalog_service/list_aspect_types.rb", "snippets/catalog_service/list_entries.rb", "snippets/catalog_service/list_entry_groups.rb", "snippets/catalog_service/list_entry_types.rb", + "snippets/catalog_service/list_metadata_feeds.rb", "snippets/catalog_service/list_metadata_jobs.rb", + "snippets/catalog_service/lookup_context.rb", "snippets/catalog_service/lookup_entry.rb", + "snippets/catalog_service/lookup_entry_links.rb", "snippets/catalog_service/search_entries.rb", "snippets/catalog_service/update_aspect_type.rb", "snippets/catalog_service/update_entry.rb", "snippets/catalog_service/update_entry_group.rb", + "snippets/catalog_service/update_entry_link.rb", "snippets/catalog_service/update_entry_type.rb", + "snippets/catalog_service/update_metadata_feed.rb", "snippets/cmek_service/create_encryption_config.rb", "snippets/cmek_service/delete_encryption_config.rb", "snippets/cmek_service/get_encryption_config.rb", "snippets/cmek_service/list_encryption_configs.rb", "snippets/cmek_service/update_encryption_config.rb", - "snippets/content_service/create_content.rb", - "snippets/content_service/delete_content.rb", - "snippets/content_service/get_content.rb", - "snippets/content_service/get_iam_policy.rb", - "snippets/content_service/list_content.rb", - "snippets/content_service/set_iam_policy.rb", - "snippets/content_service/test_iam_permissions.rb", - "snippets/content_service/update_content.rb", + "snippets/data_product_service/create_data_asset.rb", + "snippets/data_product_service/create_data_product.rb", + "snippets/data_product_service/delete_data_asset.rb", + "snippets/data_product_service/delete_data_product.rb", + "snippets/data_product_service/get_data_asset.rb", + "snippets/data_product_service/get_data_product.rb", + "snippets/data_product_service/list_data_assets.rb", + "snippets/data_product_service/list_data_products.rb", + "snippets/data_product_service/update_data_asset.rb", + "snippets/data_product_service/update_data_product.rb", "snippets/data_scan_service/create_data_scan.rb", "snippets/data_scan_service/delete_data_scan.rb", "snippets/data_scan_service/generate_data_quality_rules.rb", @@ -231,34 +245,28 @@ "snippets/data_taxonomy_service/update_data_taxonomy.rb", "snippets/dataplex_service/cancel_job.rb", "snippets/dataplex_service/create_asset.rb", - "snippets/dataplex_service/create_environment.rb", "snippets/dataplex_service/create_lake.rb", "snippets/dataplex_service/create_task.rb", "snippets/dataplex_service/create_zone.rb", "snippets/dataplex_service/delete_asset.rb", - "snippets/dataplex_service/delete_environment.rb", "snippets/dataplex_service/delete_lake.rb", "snippets/dataplex_service/delete_task.rb", "snippets/dataplex_service/delete_zone.rb", "snippets/dataplex_service/get_asset.rb", - "snippets/dataplex_service/get_environment.rb", "snippets/dataplex_service/get_job.rb", "snippets/dataplex_service/get_lake.rb", "snippets/dataplex_service/get_task.rb", "snippets/dataplex_service/get_zone.rb", "snippets/dataplex_service/list_asset_actions.rb", "snippets/dataplex_service/list_assets.rb", - "snippets/dataplex_service/list_environments.rb", "snippets/dataplex_service/list_jobs.rb", "snippets/dataplex_service/list_lake_actions.rb", "snippets/dataplex_service/list_lakes.rb", - "snippets/dataplex_service/list_sessions.rb", "snippets/dataplex_service/list_tasks.rb", "snippets/dataplex_service/list_zone_actions.rb", "snippets/dataplex_service/list_zones.rb", "snippets/dataplex_service/run_task.rb", "snippets/dataplex_service/update_asset.rb", - "snippets/dataplex_service/update_environment.rb", "snippets/dataplex_service/update_lake.rb", "snippets/dataplex_service/update_task.rb", "snippets/dataplex_service/update_zone.rb", @@ -284,9 +292,10 @@ "test/google/cloud/dataplex/v1/cmek_service_paths_test.rb", "test/google/cloud/dataplex/v1/cmek_service_rest_test.rb", "test/google/cloud/dataplex/v1/cmek_service_test.rb", - "test/google/cloud/dataplex/v1/content_service_paths_test.rb", - "test/google/cloud/dataplex/v1/content_service_rest_test.rb", - "test/google/cloud/dataplex/v1/content_service_test.rb", + "test/google/cloud/dataplex/v1/data_product_service_operations_test.rb", + "test/google/cloud/dataplex/v1/data_product_service_paths_test.rb", + "test/google/cloud/dataplex/v1/data_product_service_rest_test.rb", + "test/google/cloud/dataplex/v1/data_product_service_test.rb", "test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb", "test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb", "test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb", @@ -305,6 +314,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + ".owlbot.rb" ] } diff --git a/google-cloud-dataplex-v1/.owlbot.rb b/google-cloud-dataplex-v1/.owlbot.rb new file mode 100644 index 000000000000..41ec497525f2 --- /dev/null +++ b/google-cloud-dataplex-v1/.owlbot.rb @@ -0,0 +1,28 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# (b/501191424): Manual removal of empty ContentService files since it contains no RPC definitions, +# preventing gRPC from generating a Stub class for it. To be removed once bug is fixed upstream. +FileUtils.rm_rf File.join(OwlBot.staging_dir, "lib", "google", "cloud", "dataplex", "v1", "content_service") +FileUtils.rm_f File.join(OwlBot.staging_dir, "lib", "google", "cloud", "dataplex", "v1", "content_service.rb") +FileUtils.rm_f File.join(OwlBot.staging_dir, "test", "google", "cloud", "dataplex", "v1", "content_service_test.rb") +FileUtils.rm_f File.join(OwlBot.staging_dir, "test", "google", "cloud", "dataplex", "v1", "content_service_paths_test.rb") +FileUtils.rm_f File.join(OwlBot.staging_dir, "test", "google", "cloud", "dataplex", "v1", "content_service_rest_test.rb") + +OwlBot.modifier path: "lib/google/cloud/dataplex/v1.rb" do |content| + content.sub!(/require "google\/cloud\/dataplex\/v1\/content_service"\n/, "") + content +end + +OwlBot.move_files diff --git a/google-cloud-dataplex-v1/Gemfile b/google-cloud-dataplex-v1/Gemfile index 6442df18fa2f..1d08558908d8 100644 --- a/google-cloud-dataplex-v1/Gemfile +++ b/google-cloud-dataplex-v1/Gemfile @@ -2,10 +2,13 @@ source "https://rubygems.org" gemspec -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" gem "rake", ">= 13.0" gem "redcarpet", "~> 3.6" gem "yard", "~> 0.9" diff --git a/google-cloud-dataplex-v1/gapic_metadata.json b/google-cloud-dataplex-v1/gapic_metadata.json index 9fb203adf973..cbf3c56fe31b 100644 --- a/google-cloud-dataplex-v1/gapic_metadata.json +++ b/google-cloud-dataplex-v1/gapic_metadata.json @@ -144,36 +144,6 @@ "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" - ] } } } @@ -403,15 +373,55 @@ "create_entry_link" ] }, + "UpdateEntryLink": { + "methods": [ + "update_entry_link" + ] + }, "DeleteEntryLink": { "methods": [ "delete_entry_link" ] }, + "LookupEntryLinks": { + "methods": [ + "lookup_entry_links" + ] + }, + "LookupContext": { + "methods": [ + "lookup_context" + ] + }, "GetEntryLink": { "methods": [ "get_entry_link" ] + }, + "CreateMetadataFeed": { + "methods": [ + "create_metadata_feed" + ] + }, + "GetMetadataFeed": { + "methods": [ + "get_metadata_feed" + ] + }, + "ListMetadataFeeds": { + "methods": [ + "list_metadata_feeds" + ] + }, + "DeleteMetadataFeed": { + "methods": [ + "delete_metadata_feed" + ] + }, + "UpdateMetadataFeed": { + "methods": [ + "update_metadata_feed" + ] } } } @@ -455,45 +465,63 @@ "clients": { "grpc": { "libraryClient": "::Google::Cloud::Dataplex::V1::ContentService::Client", + "rpcs": {} + } + } + }, + "DataProductService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataProductService::Client", "rpcs": { - "CreateContent": { + "CreateDataProduct": { + "methods": [ + "create_data_product" + ] + }, + "DeleteDataProduct": { + "methods": [ + "delete_data_product" + ] + }, + "GetDataProduct": { "methods": [ - "create_content" + "get_data_product" ] }, - "UpdateContent": { + "ListDataProducts": { "methods": [ - "update_content" + "list_data_products" ] }, - "DeleteContent": { + "UpdateDataProduct": { "methods": [ - "delete_content" + "update_data_product" ] }, - "GetContent": { + "CreateDataAsset": { "methods": [ - "get_content" + "create_data_asset" ] }, - "GetIamPolicy": { + "UpdateDataAsset": { "methods": [ - "get_iam_policy" + "update_data_asset" ] }, - "SetIamPolicy": { + "DeleteDataAsset": { "methods": [ - "set_iam_policy" + "delete_data_asset" ] }, - "TestIamPermissions": { + "GetDataAsset": { "methods": [ - "test_iam_permissions" + "get_data_asset" ] }, - "ListContent": { + "ListDataAssets": { "methods": [ - "list_content" + "list_data_assets" ] } } diff --git a/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec b/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec index 0448f95458ef..9471bd20f65e 100644 --- a/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec +++ b/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |gem| ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] gem.require_paths = ["lib"] - gem.required_ruby_version = ">= 3.1" + gem.required_ruby_version = ">= 3.2" gem.add_dependency "gapic-common", "~> 1.2" gem.add_dependency "google-cloud-errors", "~> 1.0" diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb index 57740e8dd3f9..40160a2c29c1 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb @@ -20,7 +20,7 @@ require "google/cloud/dataplex/v1/business_glossary_service" require "google/cloud/dataplex/v1/catalog_service" require "google/cloud/dataplex/v1/cmek_service" -require "google/cloud/dataplex/v1/content_service" +require "google/cloud/dataplex/v1/data_product_service" require "google/cloud/dataplex/v1/data_taxonomy_service" require "google/cloud/dataplex/v1/data_scan_service" require "google/cloud/dataplex/v1/metadata_service" diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb index 86e65c604fd7..6d49a5c634de 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb @@ -13,31 +13,8 @@ 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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb index 9669f33c3617..59ae9aa66345 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb @@ -18,31 +18,8 @@ descriptor_data = "\n0google/cloud/dataplex/v1/business_glossary.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.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\x1fgoogle/protobuf/timestamp.proto\"\x94\x04\n\x08Glossary\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x04 \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\x43\n\x06labels\x18\x07 \x03(\x0b\x32..google.cloud.dataplex.v1.Glossary.LabelsEntryB\x03\xe0\x41\x01\x12\x17\n\nterm_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1b\n\x0e\x63\x61tegory_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\n \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:z\xea\x41w\n dataplex.googleapis.com/Glossary\x12=projects/{project}/locations/{location}/glossaries/{glossary}*\nglossaries2\x08glossary\"\x99\x04\n\x10GlossaryCategory\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x04 \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\x12K\n\x06labels\x18\x07 \x03(\x0b\x32\x36.google.cloud.dataplex.v1.GlossaryCategory.LabelsEntryB\x03\xe0\x41\x01\x12\x13\n\x06parent\x18\x08 \x01(\tB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa2\x01\xea\x41\x9e\x01\n(dataplex.googleapis.com/GlossaryCategory\x12\\projects/{project}/locations/{location}/glossaries/{glossary}/categories/{glossary_category}*\ncategories2\x08\x63\x61tegory\"\xa0\x04\n\x0cGlossaryTerm\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x04 \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\x12G\n\x06labels\x18\x07 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.GlossaryTerm.LabelsEntryB\x03\xe0\x41\x01\x12\x38\n\x06parent\x18\x08 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/Glossary\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8c\x01\xea\x41\x88\x01\n$dataplex.googleapis.com/GlossaryTerm\x12Sprojects/{project}/locations/{location}/glossaries/{glossary}/terms/{glossary_term}*\x05terms2\x04term\"\xc3\x01\n\x15\x43reateGlossaryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x18\n\x0bglossary_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x08glossary\x18\x03 \x01(\x0b\x32\".google.cloud.dataplex.v1.GlossaryB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa4\x01\n\x15UpdateGlossaryRequest\x12\x39\n\x08glossary\x18\x01 \x01(\x0b\x32\".google.cloud.dataplex.v1.GlossaryB\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\"b\n\x15\x44\x65leteGlossaryRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/Glossary\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"L\n\x12GetGlossaryRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/Glossary\"\xaf\x01\n\x15ListGlossariesRequest\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\"\x88\x01\n\x16ListGlossariesResponse\x12\x36\n\nglossaries\x18\x01 \x03(\x0b\x32\".google.cloud.dataplex.v1.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"\xb6\x01\n\x1d\x43reateGlossaryCategoryRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/Glossary\x12\x18\n\x0b\x63\x61tegory_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x08\x63\x61tegory\x18\x03 \x01(\x0b\x32*.google.cloud.dataplex.v1.GlossaryCategoryB\x03\xe0\x41\x02\"\x98\x01\n\x1dUpdateGlossaryCategoryRequest\x12\x41\n\x08\x63\x61tegory\x18\x01 \x01(\x0b\x32*.google.cloud.dataplex.v1.GlossaryCategoryB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"_\n\x1d\x44\x65leteGlossaryCategoryRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(dataplex.googleapis.com/GlossaryCategory\"\\\n\x1aGetGlossaryCategoryRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(dataplex.googleapis.com/GlossaryCategory\"\xb6\x01\n\x1dListGlossaryCategoriesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/Glossary\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\"\x98\x01\n\x1eListGlossaryCategoriesResponse\x12>\n\ncategories\x18\x01 \x03(\x0b\x32*.google.cloud.dataplex.v1.GlossaryCategory\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"\xa6\x01\n\x19\x43reateGlossaryTermRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/Glossary\x12\x14\n\x07term_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x04term\x18\x03 \x01(\x0b\x32&.google.cloud.dataplex.v1.GlossaryTermB\x03\xe0\x41\x02\"\x8c\x01\n\x19UpdateGlossaryTermRequest\x12\x39\n\x04term\x18\x01 \x01(\x0b\x32&.google.cloud.dataplex.v1.GlossaryTermB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"W\n\x19\x44\x65leteGlossaryTermRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/GlossaryTerm\"T\n\x16GetGlossaryTermRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/GlossaryTerm\"\xb1\x01\n\x18ListGlossaryTermsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/Glossary\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\x19ListGlossaryTermsResponse\x12\x35\n\x05terms\x18\x01 \x03(\x0b\x32&.google.cloud.dataplex.v1.GlossaryTerm\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t2\xd6\x18\n\x17\x42usinessGlossaryService\x12\xe0\x01\n\x0e\x43reateGlossary\x12/.google.cloud.dataplex.v1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1d\n\x08Glossary\x12\x11OperationMetadata\xda\x41\x1bparent,glossary,glossary_id\x82\xd3\xe4\x93\x02:\"./v1/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xe3\x01\n\x0eUpdateGlossary\x12/.google.cloud.dataplex.v1.UpdateGlossaryRequest\x1a\x1d.google.longrunning.Operation\"\x80\x01\xca\x41\x1d\n\x08Glossary\x12\x11OperationMetadata\xda\x41\x14glossary,update_mask\x82\xd3\xe4\x93\x02\x43\x32\x37/v1/{glossary.name=projects/*/locations/*/glossaries/*}:\x08glossary\x12\xcc\x01\n\x0e\x44\x65leteGlossary\x12/.google.cloud.dataplex.v1.DeleteGlossaryRequest\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/*/glossaries/*}\x12\x9e\x01\n\x0bGetGlossary\x12,.google.cloud.dataplex.v1.GetGlossaryRequest\x1a\".google.cloud.dataplex.v1.Glossary\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/glossaries/*}\x12\xb4\x01\n\x0eListGlossaries\x12/.google.cloud.dataplex.v1.ListGlossariesRequest\x1a\x30.google.cloud.dataplex.v1.ListGlossariesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/glossaries\x12\xea\x01\n\x16\x43reateGlossaryCategory\x12\x37.google.cloud.dataplex.v1.CreateGlossaryCategoryRequest\x1a*.google.cloud.dataplex.v1.GlossaryCategory\"k\xda\x41\x1bparent,category,category_id\x82\xd3\xe4\x93\x02G\";/v1/{parent=projects/*/locations/*/glossaries/*}/categories:\x08\x63\x61tegory\x12\xec\x01\n\x16UpdateGlossaryCategory\x12\x37.google.cloud.dataplex.v1.UpdateGlossaryCategoryRequest\x1a*.google.cloud.dataplex.v1.GlossaryCategory\"m\xda\x41\x14\x63\x61tegory,update_mask\x82\xd3\xe4\x93\x02P2D/v1/{category.name=projects/*/locations/*/glossaries/*/categories/*}:\x08\x63\x61tegory\x12\xb5\x01\n\x16\x44\x65leteGlossaryCategory\x12\x37.google.cloud.dataplex.v1.DeleteGlossaryCategoryRequest\x1a\x16.google.protobuf.Empty\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/glossaries/*/categories/*}\x12\xc3\x01\n\x13GetGlossaryCategory\x12\x34.google.cloud.dataplex.v1.GetGlossaryCategoryRequest\x1a*.google.cloud.dataplex.v1.GlossaryCategory\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/glossaries/*/categories/*}\x12\xd9\x01\n\x16ListGlossaryCategories\x12\x37.google.cloud.dataplex.v1.ListGlossaryCategoriesRequest\x1a\x38.google.cloud.dataplex.v1.ListGlossaryCategoriesResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/glossaries/*}/categories\x12\xcd\x01\n\x12\x43reateGlossaryTerm\x12\x33.google.cloud.dataplex.v1.CreateGlossaryTermRequest\x1a&.google.cloud.dataplex.v1.GlossaryTerm\"Z\xda\x41\x13parent,term,term_id\x82\xd3\xe4\x93\x02>\"6/v1/{parent=projects/*/locations/*/glossaries/*}/terms:\x04term\x12\xcf\x01\n\x12UpdateGlossaryTerm\x12\x33.google.cloud.dataplex.v1.UpdateGlossaryTermRequest\x1a&.google.cloud.dataplex.v1.GlossaryTerm\"\\\xda\x41\x10term,update_mask\x82\xd3\xe4\x93\x02\x43\x32;/v1/{term.name=projects/*/locations/*/glossaries/*/terms/*}:\x04term\x12\xa8\x01\n\x12\x44\x65leteGlossaryTerm\x12\x33.google.cloud.dataplex.v1.DeleteGlossaryTermRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/glossaries/*/terms/*}\x12\xb2\x01\n\x0fGetGlossaryTerm\x12\x30.google.cloud.dataplex.v1.GetGlossaryTermRequest\x1a&.google.cloud.dataplex.v1.GlossaryTerm\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/glossaries/*/terms/*}\x12\xc5\x01\n\x11ListGlossaryTerms\x12\x32.google.cloud.dataplex.v1.ListGlossaryTermsRequest\x1a\x33.google.cloud.dataplex.v1.ListGlossaryTermsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*/glossaries/*}/terms\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBq\n\x1c\x63om.google.cloud.dataplex.v1B\x15\x42usinessGlossaryProtoP\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.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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud 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 77026486deea..558348780ca9 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 @@ -17,34 +17,10 @@ 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\x1bgoogle/api/field_info.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\"\x83\x0f\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\x12\\\n\x13\x64\x61ta_classification\x18\t \x01(\x0e\x32\x37.google.cloud.dataplex.v1.AspectType.DataClassificationB\x06\xe0\x41\x01\xe0\x41\x05\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\"P\n\x12\x44\x61taClassification\x12#\n\x1f\x44\x41TA_CLASSIFICATION_UNSPECIFIED\x10\x00\x12\x15\n\x11METADATA_AND_DATA\x10\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\"\x86\x01\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\x12\x14\n\x0c\x64\x61ta_version\x18\x0c \x01(\t\"\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\"\xd1\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\x12\x15\n\x08location\x18\x0c \x01(\tB\x03\xe0\x41\x03\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\"\xdd\x01\n\x14SearchEntriesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\x12\x1c\n\x0fsemantic_search\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\"\x86\x02\n\x13SearchEntriesResult\x12\x1b\n\x0flinked_resource\x18\x08 \x01(\tB\x02\x18\x01\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12L\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.SnippetsB\x02\x18\x01\x1aK\n\x08Snippets\x12;\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x02\x18\x01:\x02\x18\x01\"\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\"\xbb\x01\n\nImportItem\x12.\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x37\n\nentry_link\x18\x04 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryLink\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0b\x61spect_keys\x18\x03 \x03(\t\"\xd1\x01\n\x18\x43reateMetadataJobRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12@\n\x0cmetadata_job\x18\x02 \x01(\x0b\x32%.google.cloud.dataplex.v1.MetadataJobB\x03\xe0\x41\x02\x12\x1c\n\x0fmetadata_job_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"R\n\x15GetMetadataJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/MetadataJob\"\xb1\x01\n\x17ListMetadataJobsRequest\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\"\x90\x01\n\x18ListMetadataJobsResponse\x12<\n\rmetadata_jobs\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.MetadataJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"U\n\x18\x43\x61ncelMetadataJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/MetadataJob\"\xee\x17\n\x0bMetadataJob\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x46\n\x06labels\x18\x05 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.MetadataJob.LabelsEntryB\x03\xe0\x41\x01\x12=\n\x04type\x18\x06 \x01(\x0e\x32*.google.cloud.dataplex.v1.MetadataJob.TypeB\x03\xe0\x41\x02\x12J\n\x0bimport_spec\x18\x64 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.MetadataJob.ImportJobSpecH\x00\x12J\n\x0b\x65xport_spec\x18\x65 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.MetadataJob.ExportJobSpecH\x00\x12T\n\rimport_result\x18\xc8\x01 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.MetadataJob.ImportJobResultB\x03\xe0\x41\x03H\x01\x12T\n\rexport_result\x18\xc9\x01 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.MetadataJob.ExportJobResultB\x03\xe0\x41\x03H\x01\x12\x41\n\x06status\x18\x07 \x01(\x0b\x32,.google.cloud.dataplex.v1.MetadataJob.StatusB\x03\xe0\x41\x03\x1a\xc9\x02\n\x0fImportJobResult\x12\x1c\n\x0f\x64\x65leted_entries\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fupdated_entries\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63reated_entries\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x11unchanged_entries\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x11recreated_entries\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12 \n\x13\x64\x65leted_entry_links\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13\x63reated_entry_links\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\x15unchanged_entry_links\x18\t \x01(\x03\x42\x03\xe0\x41\x03\x1aL\n\x0f\x45xportJobResult\x12\x1d\n\x10\x65xported_entries\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\xb6\x07\n\rImportJobSpec\x12\x1f\n\x12source_storage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12;\n\x12source_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12V\n\x05scope\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScopeB\x03\xe0\x41\x02\x12Z\n\x0f\x65ntry_sync_mode\x18\x03 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncModeB\x03\xe0\x41\x02\x12[\n\x10\x61spect_sync_mode\x18\x04 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncModeB\x03\xe0\x41\x02\x12T\n\tlog_level\x18\x06 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevelB\x03\xe0\x41\x01\x1a\xd7\x02\n\x0eImportJobScope\x12@\n\x0c\x65ntry_groups\x18\x01 \x03(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12>\n\x0b\x65ntry_types\x18\x02 \x03(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12@\n\x0c\x61spect_types\x18\x03 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12<\n\nglossaries\x18\x04 \x03(\tB(\xe0\x41\x01\xfa\x41\"\n dataplex.googleapis.com/Glossary\x12\x1d\n\x10\x65ntry_link_types\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17referenced_entry_scopes\x18\x06 \x03(\tB\x03\xe0\x41\x01\"J\n\x08SyncMode\x12\x19\n\x15SYNC_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x12\x08\n\x04NONE\x10\x03\":\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\t\n\x05\x44\x45\x42UG\x10\x01\x12\x08\n\x04INFO\x10\x02\x1a\xaf\x03\n\rExportJobSpec\x12V\n\x05scope\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.MetadataJob.ExportJobSpec.ExportJobScopeB\x03\xe0\x41\x02\x12\x18\n\x0boutput_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\xab\x02\n\x0e\x45xportJobScope\x12\x1a\n\x12organization_level\x18\x01 \x01(\x08\x12\x42\n\x08projects\x18\x02 \x03(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12=\n\x0c\x65ntry_groups\x18\x03 \x03(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12;\n\x0b\x65ntry_types\x18\x04 \x03(\tB&\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12=\n\x0c\x61spect_types\x18\x05 \x03(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\xca\x02\n\x06Status\x12\x46\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.MetadataJob.Status.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63ompletion_percent\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tCANCELING\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x19\n\x15SUCCEEDED_WITH_ERRORS\x10\x07\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06IMPORT\x10\x01\x12\n\n\x06\x45XPORT\x10\x02:l\xea\x41i\n#dataplex.googleapis.com/MetadataJob\x12\x42projects/{project}/locations/{location}/metadataJobs/{metadataJob}B\x06\n\x04specB\x08\n\x06result\"\x82\x05\n\tEntryLink\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\xfa\x41#\n!dataplex.googleapis.com/EntryLink\x12\x1f\n\x0f\x65ntry_link_type\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\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\x12Q\n\x10\x65ntry_references\x18\n \x03(\x0b\x32\x32.google.cloud.dataplex.v1.EntryLink.EntryReferenceB\x03\xe0\x41\x02\x1a\xb9\x01\n\x0e\x45ntryReference\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12M\n\x04type\x18\x03 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.EntryLink.EntryReference.TypeB\x06\xe0\x41\x02\xe0\x41\x05\"/\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06SOURCE\x10\x02\x12\n\n\x06TARGET\x10\x03:\x99\x01\xea\x41\x95\x01\n!dataplex.googleapis.com/EntryLink\x12Yprojects/{project}/locations/{location}/entryGroups/{entry_group}/entryLinks/{entry_link}*\nentryLinks2\tentryLink\"\xae\x01\n\x16\x43reateEntryLinkRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x1a\n\rentry_link_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_link\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryLinkB\x03\xe0\x41\x02\"Q\n\x16\x44\x65leteEntryLinkRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryLink\"N\n\x13GetEntryLinkRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryLink*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\xde-\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\x12\xf8\x01\n\x11\x43reateMetadataJob\x12\x32.google.cloud.dataplex.v1.CreateMetadataJobRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0bMetadataJob\x12\x11OperationMetadata\xda\x41#parent,metadata_job,metadata_job_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/metadataJobs:\x0cmetadata_job\x12\xa9\x01\n\x0eGetMetadataJob\x12/.google.cloud.dataplex.v1.GetMetadataJobRequest\x1a%.google.cloud.dataplex.v1.MetadataJob\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/metadataJobs/*}\x12\xbc\x01\n\x10ListMetadataJobs\x12\x31.google.cloud.dataplex.v1.ListMetadataJobsRequest\x1a\x32.google.cloud.dataplex.v1.ListMetadataJobsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/metadataJobs\x12\xaa\x01\n\x11\x43\x61ncelMetadataJob\x12\x32.google.cloud.dataplex.v1.CancelMetadataJobRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel:\x01*\x12\xdc\x01\n\x0f\x43reateEntryLink\x12\x30.google.cloud.dataplex.v1.CreateEntryLinkRequest\x1a#.google.cloud.dataplex.v1.EntryLink\"r\xda\x41\x1fparent,entry_link,entry_link_id\x82\xd3\xe4\x93\x02J\"*\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\"\xe6\x01\n\x14LookupContextRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\tresources\x18\x02 \x03(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12Q\n\x07options\x18\x04 \x03(\x0b\x32;.google.cloud.dataplex.v1.LookupContextRequest.OptionsEntryB\x03\xe0\x41\x01\x1a.\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"(\n\x15LookupContextResponse\x12\x0f\n\x07\x63ontext\x18\x01 \x01(\t\"\xdd\x01\n\x14SearchEntriesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\x12\x1c\n\x0fsemantic_search\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\"\x86\x02\n\x13SearchEntriesResult\x12\x1b\n\x0flinked_resource\x18\x08 \x01(\tB\x02\x18\x01\x12\x37\n\x0e\x64\x61taplex_entry\x18\t \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12L\n\x08snippets\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.SearchEntriesResult.SnippetsB\x02\x18\x01\x1aK\n\x08Snippets\x12;\n\x0e\x64\x61taplex_entry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.EntryB\x02\x18\x01:\x02\x18\x01\"\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\"\xbb\x01\n\nImportItem\x12.\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x1f.google.cloud.dataplex.v1.Entry\x12\x37\n\nentry_link\x18\x04 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryLink\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x13\n\x0b\x61spect_keys\x18\x03 \x03(\t\"\xd1\x01\n\x18\x43reateMetadataJobRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12@\n\x0cmetadata_job\x18\x02 \x01(\x0b\x32%.google.cloud.dataplex.v1.MetadataJobB\x03\xe0\x41\x02\x12\x1c\n\x0fmetadata_job_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"R\n\x15GetMetadataJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/MetadataJob\"\xb1\x01\n\x17ListMetadataJobsRequest\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\"\x90\x01\n\x18ListMetadataJobsResponse\x12<\n\rmetadata_jobs\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.MetadataJob\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1d\n\x15unreachable_locations\x18\x03 \x03(\t\"U\n\x18\x43\x61ncelMetadataJobRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/MetadataJob\"\xee\x17\n\x0bMetadataJob\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x46\n\x06labels\x18\x05 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.MetadataJob.LabelsEntryB\x03\xe0\x41\x01\x12=\n\x04type\x18\x06 \x01(\x0e\x32*.google.cloud.dataplex.v1.MetadataJob.TypeB\x03\xe0\x41\x02\x12J\n\x0bimport_spec\x18\x64 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.MetadataJob.ImportJobSpecH\x00\x12J\n\x0b\x65xport_spec\x18\x65 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.MetadataJob.ExportJobSpecH\x00\x12T\n\rimport_result\x18\xc8\x01 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.MetadataJob.ImportJobResultB\x03\xe0\x41\x03H\x01\x12T\n\rexport_result\x18\xc9\x01 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.MetadataJob.ExportJobResultB\x03\xe0\x41\x03H\x01\x12\x41\n\x06status\x18\x07 \x01(\x0b\x32,.google.cloud.dataplex.v1.MetadataJob.StatusB\x03\xe0\x41\x03\x1a\xc9\x02\n\x0fImportJobResult\x12\x1c\n\x0f\x64\x65leted_entries\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fupdated_entries\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63reated_entries\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x11unchanged_entries\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x11recreated_entries\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12 \n\x13\x64\x65leted_entry_links\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13\x63reated_entry_links\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\x15unchanged_entry_links\x18\t \x01(\x03\x42\x03\xe0\x41\x03\x1aL\n\x0f\x45xportJobResult\x12\x1d\n\x10\x65xported_entries\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\xb6\x07\n\rImportJobSpec\x12\x1f\n\x12source_storage_uri\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12;\n\x12source_create_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12V\n\x05scope\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.ImportJobScopeB\x03\xe0\x41\x02\x12Z\n\x0f\x65ntry_sync_mode\x18\x03 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncModeB\x03\xe0\x41\x02\x12[\n\x10\x61spect_sync_mode\x18\x04 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.SyncModeB\x03\xe0\x41\x02\x12T\n\tlog_level\x18\x06 \x01(\x0e\x32<.google.cloud.dataplex.v1.MetadataJob.ImportJobSpec.LogLevelB\x03\xe0\x41\x01\x1a\xd7\x02\n\x0eImportJobScope\x12@\n\x0c\x65ntry_groups\x18\x01 \x03(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12>\n\x0b\x65ntry_types\x18\x02 \x03(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12@\n\x0c\x61spect_types\x18\x03 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12<\n\nglossaries\x18\x04 \x03(\tB(\xe0\x41\x01\xfa\x41\"\n dataplex.googleapis.com/Glossary\x12\x1d\n\x10\x65ntry_link_types\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17referenced_entry_scopes\x18\x06 \x03(\tB\x03\xe0\x41\x01\"J\n\x08SyncMode\x12\x19\n\x15SYNC_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0f\n\x0bINCREMENTAL\x10\x02\x12\x08\n\x04NONE\x10\x03\":\n\x08LogLevel\x12\x19\n\x15LOG_LEVEL_UNSPECIFIED\x10\x00\x12\t\n\x05\x44\x45\x42UG\x10\x01\x12\x08\n\x04INFO\x10\x02\x1a\xaf\x03\n\rExportJobSpec\x12V\n\x05scope\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.MetadataJob.ExportJobSpec.ExportJobScopeB\x03\xe0\x41\x02\x12\x18\n\x0boutput_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\xab\x02\n\x0e\x45xportJobScope\x12\x1a\n\x12organization_level\x18\x01 \x01(\x08\x12\x42\n\x08projects\x18\x02 \x03(\tB0\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12=\n\x0c\x65ntry_groups\x18\x03 \x03(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12;\n\x0b\x65ntry_types\x18\x04 \x03(\tB&\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12=\n\x0c\x61spect_types\x18\x05 \x03(\tB\'\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x1a\xca\x02\n\x06Status\x12\x46\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.MetadataJob.Status.StateB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63ompletion_percent\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x8a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tCANCELING\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\x19\n\x15SUCCEEDED_WITH_ERRORS\x10\x07\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06IMPORT\x10\x01\x12\n\n\x06\x45XPORT\x10\x02:l\xea\x41i\n#dataplex.googleapis.com/MetadataJob\x12\x42projects/{project}/locations/{location}/metadataJobs/{metadataJob}B\x06\n\x04specB\x08\n\x06result\"\x9f\x06\n\tEntryLink\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\xfa\x41#\n!dataplex.googleapis.com/EntryLink\x12\x1f\n\x0f\x65ntry_link_type\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\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\x46\n\x07\x61spects\x18\x06 \x03(\x0b\x32\x30.google.cloud.dataplex.v1.EntryLink.AspectsEntryB\x03\xe0\x41\x01\x12T\n\x10\x65ntry_references\x18\n \x03(\x0b\x32\x32.google.cloud.dataplex.v1.EntryLink.EntryReferenceB\x06\xe0\x41\x02\xe0\x41\x05\x1a\xb9\x01\n\x0e\x45ntryReference\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12M\n\x04type\x18\x03 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.EntryLink.EntryReference.TypeB\x06\xe0\x41\x02\xe0\x41\x05\"/\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06SOURCE\x10\x02\x12\n\n\x06TARGET\x10\x03\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:\x99\x01\xea\x41\x95\x01\n!dataplex.googleapis.com/EntryLink\x12Yprojects/{project}/locations/{location}/entryGroups/{entry_group}/entryLinks/{entry_link}*\nentryLinks2\tentryLink\"\xae\x01\n\x16\x43reateEntryLinkRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x12\x1a\n\rentry_link_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\nentry_link\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryLinkB\x03\xe0\x41\x02\"\x8c\x01\n\x16UpdateEntryLinkRequest\x12<\n\nentry_link\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.EntryLinkB\x03\xe0\x41\x02\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x61spect_keys\x18\x05 \x03(\tB\x03\xe0\x41\x01\"Q\n\x16\x44\x65leteEntryLinkRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryLink\"\xb5\x02\n\x17LookupEntryLinksRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x05\x65ntry\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Entry\x12O\n\nentry_mode\x18\x03 \x01(\x0e\x32;.google.cloud.dataplex.v1.LookupEntryLinksRequest.EntryMode\x12\x18\n\x10\x65ntry_link_types\x18\x04 \x03(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"?\n\tEntryMode\x12\x1a\n\x16\x45NTRY_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06SOURCE\x10\x01\x12\n\n\x06TARGET\x10\x02\"m\n\x18LookupEntryLinksResponse\x12\x38\n\x0b\x65ntry_links\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.EntryLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x13GetEntryLinkRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/EntryLink\"\xc8\x08\n\x0cMetadataFeed\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12@\n\x05scope\x18\x03 \x01(\x0b\x32,.google.cloud.dataplex.v1.MetadataFeed.ScopeB\x03\xe0\x41\x02\x12\x44\n\x07\x66ilters\x18\x04 \x01(\x0b\x32..google.cloud.dataplex.v1.MetadataFeed.FiltersB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x06labels\x18\x08 \x03(\x0b\x32\x32.google.cloud.dataplex.v1.MetadataFeed.LabelsEntryB\x03\xe0\x41\x01\x12\x1b\n\x0cpubsub_topic\x18\x64 \x01(\tB\x03\xe0\x41\x01H\x00\x1a\xb1\x01\n\x05Scope\x12\x1f\n\x12organization_level\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x45\n\x08projects\x18\x02 \x03(\tB3\xe0\x41\x01\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12@\n\x0c\x65ntry_groups\x18\x03 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"dataplex.googleapis.com/EntryGroup\x1a\xb0\x02\n\x07\x46ilters\x12>\n\x0b\x65ntry_types\x18\x01 \x03(\tB)\xe0\x41\x01\xfa\x41#\n!dataplex.googleapis.com/EntryType\x12@\n\x0c\x61spect_types\x18\x02 \x03(\tB*\xe0\x41\x01\xfa\x41$\n\"dataplex.googleapis.com/AspectType\x12T\n\x0c\x63hange_types\x18\x03 \x03(\x0e\x32\x39.google.cloud.dataplex.v1.MetadataFeed.Filters.ChangeTypeB\x03\xe0\x41\x01\"M\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8e\x01\xea\x41\x8a\x01\n$dataplex.googleapis.com/MetadataFeed\x12\x45projects/{project}/locations/{location}/metadataFeeds/{metadata_feed}*\rmetadataFeeds2\x0cmetadataFeedB\n\n\x08\x65ndpoint\"\xd5\x01\n\x19\x43reateMetadataFeedRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x42\n\rmetadata_feed\x18\x02 \x01(\x0b\x32&.google.cloud.dataplex.v1.MetadataFeedB\x03\xe0\x41\x02\x12\x1d\n\x10metadata_feed_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"T\n\x16GetMetadataFeedRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/MetadataFeed\"\xb2\x01\n\x18ListMetadataFeedsRequest\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\"\x8e\x01\n\x19ListMetadataFeedsResponse\x12>\n\x0emetadata_feeds\x18\x01 \x03(\x0b\x32&.google.cloud.dataplex.v1.MetadataFeed\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"W\n\x19\x44\x65leteMetadataFeedRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/MetadataFeed\"\xb1\x01\n\x19UpdateMetadataFeedRequest\x12\x42\n\rmetadata_feed\x18\x01 \x01(\x0b\x32&.google.cloud.dataplex.v1.MetadataFeedB\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\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01*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\x8f<\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\x12\xf8\x01\n\x11\x43reateMetadataJob\x12\x32.google.cloud.dataplex.v1.CreateMetadataJobRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0bMetadataJob\x12\x11OperationMetadata\xda\x41#parent,metadata_job,metadata_job_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/metadataJobs:\x0cmetadata_job\x12\xa9\x01\n\x0eGetMetadataJob\x12/.google.cloud.dataplex.v1.GetMetadataJobRequest\x1a%.google.cloud.dataplex.v1.MetadataJob\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/metadataJobs/*}\x12\xbc\x01\n\x10ListMetadataJobs\x12\x31.google.cloud.dataplex.v1.ListMetadataJobsRequest\x1a\x32.google.cloud.dataplex.v1.ListMetadataJobsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/metadataJobs\x12\xaa\x01\n\x11\x43\x61ncelMetadataJob\x12\x32.google.cloud.dataplex.v1.CancelMetadataJobRequest\x1a\x16.google.protobuf.Empty\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/metadataJobs/*}:cancel:\x01*\x12\xdc\x01\n\x0f\x43reateEntryLink\x12\x30.google.cloud.dataplex.v1.CreateEntryLinkRequest\x1a#.google.cloud.dataplex.v1.EntryLink\"r\xda\x41\x1fparent,entry_link,entry_link_id\x82\xd3\xe4\x93\x02J\"*\x12] + # Optional. The map keys of the Aspects which the service should modify. + # It should be the aspect type reference in the format + # `{project_id_or_number}.{location_id}.{aspect_type_id}`. + # + # If this field is left empty, the service treats it 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::EntryLink] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::UpdateEntryLinkRequest.new + # + # # Call the update_entry_link method. + # result = client.update_entry_link request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # p result + # + def update_entry_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest + + # Converts hash and nil to 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_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entry_link&.name + header_params["entry_link.name"] = request.entry_link.name + end + + request_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_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Deletes an Entry Link. # - # @overload delete_entry_link(request, options = nil) - # Pass arguments to `delete_entry_link` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest} or an equivalent Hash. + # @overload delete_entry_link(request, options = nil) + # Pass arguments to `delete_entry_link` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_link(name: nil) + # Pass arguments to `delete_entry_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep 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 Link: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryLink] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::DeleteEntryLinkRequest.new + # + # # Call the delete_entry_link method. + # result = client.delete_entry_link request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # p result + # + def delete_entry_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest + + # Converts hash and nil to 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_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up Entry Links referencing the specified Entry. + # + # @overload lookup_entry_links(request, options = nil) + # Pass arguments to `lookup_entry_links` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_links(name: nil, entry: nil, entry_mode: nil, entry_link_types: nil, page_size: nil, page_token: nil) + # Pass arguments to `lookup_entry_links` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 to + # Format: `projects/{project_id_or_number}/locations/{location_id}`. + # @param entry [::String] + # Required. The resource name of the referred Entry. + # Format: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. + # Entry Links which references this entry will be returned in the response. + # @param entry_mode [::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest::EntryMode] + # Mode of entry reference. + # @param entry_link_types [::Array<::String>] + # Entry link types to filter the response by. If empty, all entry link types + # will be returned. At most 10 entry link types can be specified. + # @param page_size [::Integer] + # Maximum number of EntryLinks to return. The service may return fewer + # than this value. If unspecified, at most 10 EntryLinks will be returned. + # The maximum value is 10; values above 10 will be coerced to 10. + # @param page_token [::String] + # Page token received from a previous `LookupEntryLinks` call. Provide this + # to retrieve the subsequent page. When paginating, all other parameters that + # are provided to the `LookupEntryLinks` request 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::EntryLink>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryLink>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::LookupEntryLinksRequest.new + # + # # Call the lookup_entry_links method. + # result = client.lookup_entry_links request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryLink. + # p item + # end + # + def lookup_entry_links request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest + + # Converts hash and nil to 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_links.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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_links.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_entry_links.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :lookup_entry_links, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :lookup_entry_links, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up LLM Context for the specified resources. + # + # @overload lookup_context(request, options = nil) + # Pass arguments to `lookup_context` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupContextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupContextRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_context(name: nil, resources: nil, options: nil) + # Pass arguments to `lookup_context` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 resources [::Array<::String>] + # Required. The entry names to lookup context for. The request should have + # max 10 of those. + # + # ## Examples: + # + # projects/\\{project}/locations/\\{location}/entryGroups/\\{entry_group}/entries/\\{entry} + # @param options [::Hash{::String => ::String}] + # Optional. Allows to configure the context. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::LookupContextResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::LookupContextResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::LookupContextRequest.new + # + # # Call the lookup_context method. + # result = client.lookup_context request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::LookupContextResponse. + # p result + # + def lookup_context request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupContextRequest + + # Converts hash and nil to 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_context.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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_context.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_context.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :lookup_context, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Entry Link. + # + # @overload get_entry_link(request, options = nil) + # Pass arguments to `get_entry_link` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_link(name: nil) + # Pass arguments to `get_entry_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep 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 Link: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryLink] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::GetEntryLinkRequest.new + # + # # Call the get_entry_link method. + # result = client.get_entry_link request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # p result + # + def get_entry_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest + + # Converts hash and nil to 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_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a MetadataFeed. + # + # @overload create_metadata_feed(request, options = nil) + # Pass arguments to `create_metadata_feed` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_feed(parent: nil, metadata_feed: nil, metadata_feed_id: nil, validate_only: nil) + # Pass arguments to `create_metadata_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep 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, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @param metadata_feed [::Google::Cloud::Dataplex::V1::MetadataFeed, ::Hash] + # Required. The metadata job resource. + # @param metadata_feed_id [::String] + # Optional. The metadata job ID. If not provided, a unique ID is generated + # with the prefix `metadata-job-`. + # @param validate_only [::Boolean] + # Optional. The service validates the request without performing any + # 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::CreateMetadataFeedRequest.new + # + # # Call the create_metadata_feed method. + # result = client.create_metadata_feed request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_metadata_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest + + # Converts hash and nil to 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_metadata_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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_metadata_feed.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_metadata_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_metadata_feed, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a MetadataFeed. + # + # @overload get_metadata_feed(request, options = nil) + # Pass arguments to `get_metadata_feed` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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_link(name: nil) - # Pass arguments to `delete_entry_link` via keyword arguments. Note that at + # @overload get_metadata_feed(name: nil) + # Pass arguments to `get_metadata_feed` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep 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 Link: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + # Required. The resource name of the metadata feed, in the format + # `projects/{project_id_or_number}/locations/{location_id}/MetadataFeeds/{metadata_feed_id}`. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryLink] + # @yieldparam response [::Google::Cloud::Dataplex::V1::MetadataFeed] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # @return [::Google::Cloud::Dataplex::V1::MetadataFeed] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -3098,24 +3659,24 @@ def create_entry_link request, options = nil # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest.new + # request = Google::Cloud::Dataplex::V1::GetMetadataFeedRequest.new # - # # Call the delete_entry_link method. - # result = client.delete_entry_link request + # # Call the get_metadata_feed method. + # result = client.get_metadata_feed request # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataFeed. # p result # - def delete_entry_link request, options = nil + def get_metadata_feed request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest # Converts hash and nil to 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_link.metadata.to_h + metadata = @config.rpcs.get_metadata_feed.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -3132,15 +3693,15 @@ def delete_entry_link request, options = nil request_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_link.timeout, + options.apply_defaults timeout: @config.rpcs.get_metadata_feed.timeout, metadata: metadata, - retry_policy: @config.rpcs.delete_entry_link.retry_policy + retry_policy: @config.rpcs.get_metadata_feed.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @catalog_service_stub.call_rpc :delete_entry_link, request, options: options do |response, operation| + @catalog_service_stub.call_rpc :get_metadata_feed, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -3148,32 +3709,146 @@ def delete_entry_link request, options = nil end ## - # Gets an Entry Link. + # Retrieve a list of MetadataFeeds. # - # @overload get_entry_link(request, options = nil) - # Pass arguments to `get_entry_link` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryLinkRequest} or an equivalent Hash. + # @overload list_metadata_feeds(request, options = nil) + # Pass arguments to `list_metadata_feeds` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryLinkRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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_link(name: nil) - # Pass arguments to `get_entry_link` via keyword arguments. Note that at + # @overload list_metadata_feeds(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_metadata_feeds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep 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, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of metadata feeds to return. The service + # might return fewer feeds than this value. If unspecified, at most 10 feeds + # are returned. The maximum value is 1,000. + # @param page_token [::String] + # Optional. The page token received from a previous `ListMetadataFeeds` call. + # Provide this token to retrieve the subsequent page of results. When + # paginating, all other parameters that are provided to the + # `ListMetadataFeeds` request must match the call that provided the + # page token. + # @param filter [::String] + # Optional. Filter request. Filters are case-sensitive. + # The service supports the following formats: + # + # * `labels.key1 = "value1"` + # * `labels:key1` + # * `name = "value"` + # + # You can combine filters with `AND`, `OR`, and `NOT` operators. + # @param order_by [::String] + # Optional. The field to sort the results by, either `name` or `create_time`. + # 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::MetadataFeed>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::MetadataFeed>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::ListMetadataFeedsRequest.new + # + # # Call the list_metadata_feeds method. + # result = client.list_metadata_feeds request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataFeed. + # p item + # end + # + def list_metadata_feeds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest + + # Converts hash and nil to 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_metadata_feeds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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_metadata_feeds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_metadata_feeds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_metadata_feeds, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_metadata_feeds, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a MetadataFeed. + # + # @overload delete_metadata_feed(request, options = nil) + # Pass arguments to `delete_metadata_feed` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_feed(name: nil) + # Pass arguments to `delete_metadata_feed` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep 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 Link: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + # Required. The resource name of the metadata feed, in the format + # `projects/{project_id_or_number}/locations/{location_id}/MetadataFeeds/{metadata_feed_id}`. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryLink] + # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -3184,24 +3859,31 @@ def delete_entry_link request, options = nil # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryLinkRequest.new + # request = Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest.new # - # # Call the get_entry_link method. - # result = client.get_entry_link request + # # Call the delete_metadata_feed method. + # result = client.delete_metadata_feed request # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. - # p result + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_entry_link request, options = nil + def delete_metadata_feed request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest # Converts hash and nil to 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_link.metadata.to_h + metadata = @config.rpcs.delete_metadata_feed.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -3218,16 +3900,118 @@ def get_entry_link request, options = nil request_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_link.timeout, + options.apply_defaults timeout: @config.rpcs.delete_metadata_feed.timeout, metadata: metadata, - retry_policy: @config.rpcs.get_entry_link.retry_policy + retry_policy: @config.rpcs.delete_metadata_feed.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @catalog_service_stub.call_rpc :get_entry_link, request, options: options do |response, operation| + @catalog_service_stub.call_rpc :delete_metadata_feed, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a MetadataFeed. + # + # @overload update_metadata_feed(request, options = nil) + # Pass arguments to `update_metadata_feed` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_feed(metadata_feed: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_metadata_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param metadata_feed [::Google::Cloud::Dataplex::V1::MetadataFeed, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. 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::UpdateMetadataFeedRequest.new + # + # # Call the update_metadata_feed method. + # result = client.update_metadata_feed request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_metadata_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest + + # Converts hash and nil to 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_metadata_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.metadata_feed&.name + header_params["metadata_feed.name"] = request.metadata_feed.name + end + + request_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_metadata_feed.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_metadata_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_metadata_feed, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? + throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) @@ -3552,15 +4336,55 @@ class Rpcs # attr_reader :create_entry_link ## + # RPC-specific configuration for `update_entry_link` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_link + ## # RPC-specific configuration for `delete_entry_link` # @return [::Gapic::Config::Method] # attr_reader :delete_entry_link ## + # RPC-specific configuration for `lookup_entry_links` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entry_links + ## + # RPC-specific configuration for `lookup_context` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_context + ## # RPC-specific configuration for `get_entry_link` # @return [::Gapic::Config::Method] # attr_reader :get_entry_link + ## + # RPC-specific configuration for `create_metadata_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :create_metadata_feed + ## + # RPC-specific configuration for `get_metadata_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :get_metadata_feed + ## + # RPC-specific configuration for `list_metadata_feeds` + # @return [::Gapic::Config::Method] + # + attr_reader :list_metadata_feeds + ## + # RPC-specific configuration for `delete_metadata_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_metadata_feed + ## + # RPC-specific configuration for `update_metadata_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :update_metadata_feed # @private def initialize parent_rpcs = nil @@ -3618,10 +4442,26 @@ def initialize parent_rpcs = nil @cancel_metadata_job = ::Gapic::Config::Method.new cancel_metadata_job_config create_entry_link_config = parent_rpcs.create_entry_link if parent_rpcs.respond_to? :create_entry_link @create_entry_link = ::Gapic::Config::Method.new create_entry_link_config + update_entry_link_config = parent_rpcs.update_entry_link if parent_rpcs.respond_to? :update_entry_link + @update_entry_link = ::Gapic::Config::Method.new update_entry_link_config delete_entry_link_config = parent_rpcs.delete_entry_link if parent_rpcs.respond_to? :delete_entry_link @delete_entry_link = ::Gapic::Config::Method.new delete_entry_link_config + lookup_entry_links_config = parent_rpcs.lookup_entry_links if parent_rpcs.respond_to? :lookup_entry_links + @lookup_entry_links = ::Gapic::Config::Method.new lookup_entry_links_config + lookup_context_config = parent_rpcs.lookup_context if parent_rpcs.respond_to? :lookup_context + @lookup_context = ::Gapic::Config::Method.new lookup_context_config get_entry_link_config = parent_rpcs.get_entry_link if parent_rpcs.respond_to? :get_entry_link @get_entry_link = ::Gapic::Config::Method.new get_entry_link_config + create_metadata_feed_config = parent_rpcs.create_metadata_feed if parent_rpcs.respond_to? :create_metadata_feed + @create_metadata_feed = ::Gapic::Config::Method.new create_metadata_feed_config + get_metadata_feed_config = parent_rpcs.get_metadata_feed if parent_rpcs.respond_to? :get_metadata_feed + @get_metadata_feed = ::Gapic::Config::Method.new get_metadata_feed_config + list_metadata_feeds_config = parent_rpcs.list_metadata_feeds if parent_rpcs.respond_to? :list_metadata_feeds + @list_metadata_feeds = ::Gapic::Config::Method.new list_metadata_feeds_config + delete_metadata_feed_config = parent_rpcs.delete_metadata_feed if parent_rpcs.respond_to? :delete_metadata_feed + @delete_metadata_feed = ::Gapic::Config::Method.new delete_metadata_feed_config + update_metadata_feed_config = parent_rpcs.update_metadata_feed if parent_rpcs.respond_to? :update_metadata_feed + @update_metadata_feed = ::Gapic::Config::Method.new update_metadata_feed_config yield self if block_given? end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb index 1b328b2e7752..6127a6bebeae 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb @@ -26,7 +26,10 @@ module CatalogService # Credentials for the CatalogService API. class Credentials < ::Google::Auth::Credentials self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/dataplex.read-write", + "https://www.googleapis.com/auth/dataplex.readonly" ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb index 7ef96838d19d..ab2434e81a84 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb @@ -159,6 +159,25 @@ def location_path project:, location: "projects/#{project}/locations/#{location}" end + ## + # Create a fully-qualified MetadataFeed resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/metadataFeeds/{metadata_feed}` + # + # @param project [String] + # @param location [String] + # @param metadata_feed [String] + # + # @return [::String] + def metadata_feed_path project:, location:, metadata_feed: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/metadataFeeds/#{metadata_feed}" + end + ## # Create a fully-qualified MetadataJob resource string. # 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 dc8a6e081000..43bc4997dd00 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 @@ -1990,11 +1990,6 @@ def delete_entry request, options = nil ## # Lists Entries within an EntryGroup. - # Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc - # Metastore metadata that is stored in Dataplex Universal Catalog is - # changing. For more information, see [Changes to metadata stored in - # Dataplex Universal - # Catalog](https://cloud.google.com/dataplex/docs/metadata-changes). # # @overload list_entries(request, options = nil) # Pass arguments to `list_entries` via a request object, either of type @@ -2114,11 +2109,6 @@ def list_entries request, options = nil ## # Gets an Entry. - # Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc - # Metastore metadata that is stored in Dataplex Universal Catalog is - # changing. For more information, see [Changes to metadata stored in - # Dataplex Universal - # Catalog](https://cloud.google.com/dataplex/docs/metadata-changes). # # @overload get_entry(request, options = nil) # Pass arguments to `get_entry` via a request object, either of type @@ -2207,11 +2197,6 @@ def get_entry request, options = nil ## # Looks up an entry by name using the permission on the source system. - # Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc - # Metastore metadata that is stored in Dataplex Universal Catalog is - # changing. For more information, see [Changes to metadata stored in - # Dataplex Universal - # Catalog](https://cloud.google.com/dataplex/docs/metadata-changes). # # @overload lookup_entry(request, options = nil) # Pass arguments to `lookup_entry` via a request object, either of type @@ -2867,32 +2852,566 @@ def create_entry_link request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Updates an Entry Link. + # + # @overload update_entry_link(request, options = nil) + # Pass arguments to `update_entry_link` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_link(entry_link: nil, allow_missing: nil, aspect_keys: nil) + # Pass arguments to `update_entry_link` via keyword arguments. Note that at + # least one keyword argument is 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_link [::Google::Cloud::Dataplex::V1::EntryLink, ::Hash] + # Required. Entry Link resource. + # @param allow_missing [::Boolean] + # Optional. If set to true and the entry link doesn't exist, the service will + # create it. + # @param aspect_keys [::Array<::String>] + # Optional. The map keys of the Aspects which the service should modify. + # It should be the aspect type reference in the format + # `{project_id_or_number}.{location_id}.{aspect_type_id}`. + # + # If this field is left empty, the service treats it 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::EntryLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::UpdateEntryLinkRequest.new + # + # # Call the update_entry_link method. + # result = client.update_entry_link request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # p result + # + def update_entry_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest + + # Converts hash and nil to an 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_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_entry_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry_link request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Deletes an Entry Link. # - # @overload delete_entry_link(request, options = nil) - # Pass arguments to `delete_entry_link` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest} or an equivalent Hash. + # @overload delete_entry_link(request, options = nil) + # Pass arguments to `delete_entry_link` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_link(name: nil) + # Pass arguments to `delete_entry_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep 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 Link: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::DeleteEntryLinkRequest.new + # + # # Call the delete_entry_link method. + # result = client.delete_entry_link request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # p result + # + def delete_entry_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest + + # Converts hash and nil to an 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_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_entry_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry_link request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up Entry Links referencing the specified Entry. + # + # @overload lookup_entry_links(request, options = nil) + # Pass arguments to `lookup_entry_links` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_links(name: nil, entry: nil, entry_mode: nil, entry_link_types: nil, page_size: nil, page_token: nil) + # Pass arguments to `lookup_entry_links` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 to + # Format: `projects/{project_id_or_number}/locations/{location_id}`. + # @param entry [::String] + # Required. The resource name of the referred Entry. + # Format: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. + # Entry Links which references this entry will be returned in the response. + # @param entry_mode [::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest::EntryMode] + # Mode of entry reference. + # @param entry_link_types [::Array<::String>] + # Entry link types to filter the response by. If empty, all entry link types + # will be returned. At most 10 entry link types can be specified. + # @param page_size [::Integer] + # Maximum number of EntryLinks to return. The service may return fewer + # than this value. If unspecified, at most 10 EntryLinks will be returned. + # The maximum value is 10; values above 10 will be coerced to 10. + # @param page_token [::String] + # Page token received from a previous `LookupEntryLinks` call. Provide this + # to retrieve the subsequent page. When paginating, all other parameters that + # are provided to the `LookupEntryLinks` request 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::EntryLink>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryLink>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::LookupEntryLinksRequest.new + # + # # Call the lookup_entry_links method. + # result = client.lookup_entry_links request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryLink. + # p item + # end + # + def lookup_entry_links request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest + + # Converts hash and nil to an 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_links.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_entry_links.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_entry_links.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.lookup_entry_links request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :lookup_entry_links, "entry_links", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up LLM Context for the specified resources. + # + # @overload lookup_context(request, options = nil) + # Pass arguments to `lookup_context` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupContextRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupContextRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_context(name: nil, resources: nil, options: nil) + # Pass arguments to `lookup_context` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 resources [::Array<::String>] + # Required. The entry names to lookup context for. The request should have + # max 10 of those. + # + # ## Examples: + # + # projects/\\{project}/locations/\\{location}/entryGroups/\\{entry_group}/entries/\\{entry} + # @param options [::Hash{::String => ::String}] + # Optional. Allows to configure the context. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::LookupContextResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::LookupContextResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::LookupContextRequest.new + # + # # Call the lookup_context method. + # result = client.lookup_context request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::LookupContextResponse. + # p result + # + def lookup_context request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupContextRequest + + # Converts hash and nil to an 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_context.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_context.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_context.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.lookup_context request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Entry Link. + # + # @overload get_entry_link(request, options = nil) + # Pass arguments to `get_entry_link` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_link(name: nil) + # Pass arguments to `get_entry_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep 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 Link: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::GetEntryLinkRequest.new + # + # # Call the get_entry_link method. + # result = client.get_entry_link request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # p result + # + def get_entry_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest + + # Converts hash and nil to an 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_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entry_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry_link request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a MetadataFeed. + # + # @overload create_metadata_feed(request, options = nil) + # Pass arguments to `create_metadata_feed` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_feed(parent: nil, metadata_feed: nil, metadata_feed_id: nil, validate_only: nil) + # Pass arguments to `create_metadata_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep 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, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @param metadata_feed [::Google::Cloud::Dataplex::V1::MetadataFeed, ::Hash] + # Required. The metadata job resource. + # @param metadata_feed_id [::String] + # Optional. The metadata job ID. If not provided, a unique ID is generated + # with the prefix `metadata-job-`. + # @param validate_only [::Boolean] + # Optional. The service validates the request without performing any + # 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::CreateMetadataFeedRequest.new + # + # # Call the create_metadata_feed method. + # result = client.create_metadata_feed request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_metadata_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest + + # Converts hash and nil to an 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_metadata_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_metadata_feed.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_metadata_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_metadata_feed request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a MetadataFeed. + # + # @overload get_metadata_feed(request, options = nil) + # Pass arguments to `get_metadata_feed` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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_link(name: nil) - # Pass arguments to `delete_entry_link` via keyword arguments. Note that at + # @overload get_metadata_feed(name: nil) + # Pass arguments to `get_metadata_feed` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep 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 Link: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + # Required. The resource name of the metadata feed, in the format + # `projects/{project_id_or_number}/locations/{location_id}/MetadataFeeds/{metadata_feed_id}`. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryLink] + # @yieldparam result [::Google::Cloud::Dataplex::V1::MetadataFeed] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # @return [::Google::Cloud::Dataplex::V1::MetadataFeed] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -2903,24 +3422,24 @@ def create_entry_link request, options = nil # 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::DeleteEntryLinkRequest.new + # request = Google::Cloud::Dataplex::V1::GetMetadataFeedRequest.new # - # # Call the delete_entry_link method. - # result = client.delete_entry_link request + # # Call the get_metadata_feed method. + # result = client.get_metadata_feed request # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataFeed. # p result # - def delete_entry_link request, options = nil + def get_metadata_feed request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest # Converts hash and nil to an 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_link.metadata.to_h + call_metadata = @config.rpcs.get_metadata_feed.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -2931,15 +3450,15 @@ def delete_entry_link request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.delete_entry_link.timeout, + options.apply_defaults timeout: @config.rpcs.get_metadata_feed.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry_link.retry_policy + retry_policy: @config.rpcs.get_metadata_feed.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @catalog_service_stub.delete_entry_link request, options do |result, operation| + @catalog_service_stub.get_metadata_feed request, options do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e @@ -2947,31 +3466,138 @@ def delete_entry_link request, options = nil end ## - # Gets an Entry Link. + # Retrieve a list of MetadataFeeds. # - # @overload get_entry_link(request, options = nil) - # Pass arguments to `get_entry_link` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryLinkRequest} or an equivalent Hash. + # @overload list_metadata_feeds(request, options = nil) + # Pass arguments to `list_metadata_feeds` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryLinkRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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_link(name: nil) - # Pass arguments to `get_entry_link` via keyword arguments. Note that at + # @overload list_metadata_feeds(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_metadata_feeds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep 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, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of metadata feeds to return. The service + # might return fewer feeds than this value. If unspecified, at most 10 feeds + # are returned. The maximum value is 1,000. + # @param page_token [::String] + # Optional. The page token received from a previous `ListMetadataFeeds` call. + # Provide this token to retrieve the subsequent page of results. When + # paginating, all other parameters that are provided to the + # `ListMetadataFeeds` request must match the call that provided the + # page token. + # @param filter [::String] + # Optional. Filter request. Filters are case-sensitive. + # The service supports the following formats: + # + # * `labels.key1 = "value1"` + # * `labels:key1` + # * `name = "value"` + # + # You can combine filters with `AND`, `OR`, and `NOT` operators. + # @param order_by [::String] + # Optional. The field to sort the results by, either `name` or `create_time`. + # If not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::MetadataFeed>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::MetadataFeed>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::ListMetadataFeedsRequest.new + # + # # Call the list_metadata_feeds method. + # result = client.list_metadata_feeds request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataFeed. + # p item + # end + # + def list_metadata_feeds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest + + # Converts hash and nil to an 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_metadata_feeds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_metadata_feeds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_metadata_feeds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_metadata_feeds request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_metadata_feeds, "metadata_feeds", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a MetadataFeed. + # + # @overload delete_metadata_feed(request, options = nil) + # Pass arguments to `delete_metadata_feed` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_feed(name: nil) + # Pass arguments to `delete_metadata_feed` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep 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 Link: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + # Required. The resource name of the metadata feed, in the format + # `projects/{project_id_or_number}/locations/{location_id}/MetadataFeeds/{metadata_feed_id}`. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryLink] + # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -2982,24 +3608,31 @@ def delete_entry_link request, options = nil # 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::GetEntryLinkRequest.new + # request = Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest.new # - # # Call the get_entry_link method. - # result = client.get_entry_link request + # # Call the delete_metadata_feed method. + # result = client.delete_metadata_feed request # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. - # p result + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_entry_link request, options = nil + def delete_metadata_feed request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest # Converts hash and nil to an 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_link.metadata.to_h + call_metadata = @config.rpcs.delete_metadata_feed.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -3010,16 +3643,111 @@ def get_entry_link request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.get_entry_link.timeout, + options.apply_defaults timeout: @config.rpcs.delete_metadata_feed.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.get_entry_link.retry_policy + retry_policy: @config.rpcs.delete_metadata_feed.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @catalog_service_stub.get_entry_link request, options do |result, operation| + @catalog_service_stub.delete_metadata_feed request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a MetadataFeed. + # + # @overload update_metadata_feed(request, options = nil) + # Pass arguments to `update_metadata_feed` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_feed(metadata_feed: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_metadata_feed` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param metadata_feed [::Google::Cloud::Dataplex::V1::MetadataFeed, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. 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::UpdateMetadataFeedRequest.new + # + # # Call the update_metadata_feed method. + # result = client.update_metadata_feed request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_metadata_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest + + # Converts hash and nil to an 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_metadata_feed.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_metadata_feed.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_metadata_feed.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_metadata_feed request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? + throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) @@ -3314,15 +4042,55 @@ class Rpcs # attr_reader :create_entry_link ## + # RPC-specific configuration for `update_entry_link` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_link + ## # RPC-specific configuration for `delete_entry_link` # @return [::Gapic::Config::Method] # attr_reader :delete_entry_link ## + # RPC-specific configuration for `lookup_entry_links` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entry_links + ## + # RPC-specific configuration for `lookup_context` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_context + ## # RPC-specific configuration for `get_entry_link` # @return [::Gapic::Config::Method] # attr_reader :get_entry_link + ## + # RPC-specific configuration for `create_metadata_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :create_metadata_feed + ## + # RPC-specific configuration for `get_metadata_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :get_metadata_feed + ## + # RPC-specific configuration for `list_metadata_feeds` + # @return [::Gapic::Config::Method] + # + attr_reader :list_metadata_feeds + ## + # RPC-specific configuration for `delete_metadata_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_metadata_feed + ## + # RPC-specific configuration for `update_metadata_feed` + # @return [::Gapic::Config::Method] + # + attr_reader :update_metadata_feed # @private def initialize parent_rpcs = nil @@ -3380,10 +4148,26 @@ def initialize parent_rpcs = nil @cancel_metadata_job = ::Gapic::Config::Method.new cancel_metadata_job_config create_entry_link_config = parent_rpcs.create_entry_link if parent_rpcs.respond_to? :create_entry_link @create_entry_link = ::Gapic::Config::Method.new create_entry_link_config + update_entry_link_config = parent_rpcs.update_entry_link if parent_rpcs.respond_to? :update_entry_link + @update_entry_link = ::Gapic::Config::Method.new update_entry_link_config delete_entry_link_config = parent_rpcs.delete_entry_link if parent_rpcs.respond_to? :delete_entry_link @delete_entry_link = ::Gapic::Config::Method.new delete_entry_link_config + lookup_entry_links_config = parent_rpcs.lookup_entry_links if parent_rpcs.respond_to? :lookup_entry_links + @lookup_entry_links = ::Gapic::Config::Method.new lookup_entry_links_config + lookup_context_config = parent_rpcs.lookup_context if parent_rpcs.respond_to? :lookup_context + @lookup_context = ::Gapic::Config::Method.new lookup_context_config get_entry_link_config = parent_rpcs.get_entry_link if parent_rpcs.respond_to? :get_entry_link @get_entry_link = ::Gapic::Config::Method.new get_entry_link_config + create_metadata_feed_config = parent_rpcs.create_metadata_feed if parent_rpcs.respond_to? :create_metadata_feed + @create_metadata_feed = ::Gapic::Config::Method.new create_metadata_feed_config + get_metadata_feed_config = parent_rpcs.get_metadata_feed if parent_rpcs.respond_to? :get_metadata_feed + @get_metadata_feed = ::Gapic::Config::Method.new get_metadata_feed_config + list_metadata_feeds_config = parent_rpcs.list_metadata_feeds if parent_rpcs.respond_to? :list_metadata_feeds + @list_metadata_feeds = ::Gapic::Config::Method.new list_metadata_feeds_config + delete_metadata_feed_config = parent_rpcs.delete_metadata_feed if parent_rpcs.respond_to? :delete_metadata_feed + @delete_metadata_feed = ::Gapic::Config::Method.new delete_metadata_feed_config + update_metadata_feed_config = parent_rpcs.update_metadata_feed if parent_rpcs.respond_to? :update_metadata_feed + @update_metadata_feed = ::Gapic::Config::Method.new update_metadata_feed_config yield self if block_given? end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb index fdcd6ba517fc..48763377ca7e 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb @@ -1153,6 +1153,46 @@ def create_entry_link request_pb, options = nil end end + ## + # Baseline implementation for the update_entry_link REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::EntryLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # A result object deserialized from the server's reply + def update_entry_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_link_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_entry_link", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::EntryLink.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # Baseline implementation for the delete_entry_link REST call # @@ -1193,6 +1233,86 @@ def delete_entry_link request_pb, options = nil end end + ## + # Baseline implementation for the lookup_entry_links REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::LookupEntryLinksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::LookupEntryLinksResponse] + # A result object deserialized from the server's reply + def lookup_entry_links request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_entry_links_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lookup_entry_links", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::LookupEntryLinksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the lookup_context REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupContextRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::LookupContextResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::LookupContextResponse] + # A result object deserialized from the server's reply + def lookup_context request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_context_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lookup_context", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::LookupContextResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # Baseline implementation for the get_entry_link REST call # @@ -1233,6 +1353,206 @@ def get_entry_link request_pb, options = nil end end + ## + # Baseline implementation for the create_metadata_feed REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_metadata_feed request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_metadata_feed_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_metadata_feed", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_metadata_feed REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::MetadataFeed] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::MetadataFeed] + # A result object deserialized from the server's reply + def get_metadata_feed request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_metadata_feed_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_metadata_feed", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::MetadataFeed.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_metadata_feeds REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::ListMetadataFeedsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListMetadataFeedsResponse] + # A result object deserialized from the server's reply + def list_metadata_feeds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_metadata_feeds_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_metadata_feeds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListMetadataFeedsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_metadata_feed REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_metadata_feed request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_metadata_feed_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_metadata_feed", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_metadata_feed REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_metadata_feed request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_metadata_feed_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_metadata_feed", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -1811,6 +2131,28 @@ def self.transcode_create_entry_link_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the update_entry_link REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest] + # 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_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry_link.name}", + body: "entry_link", + matches: [ + ["entry_link.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entryLinks(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + ## # @private # @@ -1832,6 +2174,49 @@ def self.transcode_delete_entry_link_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the lookup_entry_links REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest] + # 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_links_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:lookupEntryLinks", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_context REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupContextRequest] + # 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_context_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:lookupContext", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # @@ -1852,6 +2237,113 @@ def self.transcode_get_entry_link_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the create_metadata_feed REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest] + # 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_metadata_feed_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/metadataFeeds", + body: "metadata_feed", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_metadata_feed REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest] + # 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_metadata_feed_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataFeeds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_metadata_feeds REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest] + # 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_metadata_feeds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/metadataFeeds", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_metadata_feed REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest] + # 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_metadata_feed_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataFeeds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_metadata_feed REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest] + # 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_metadata_feed_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{metadata_feed.name}", + body: "metadata_feed", + matches: [ + ["metadata_feed.name", %r{^projects/[^/]+/locations/[^/]+/metadataFeeds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb index 7b46fa124441..95532f02e367 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb @@ -74,25 +74,10 @@ class Service # Deletes an Entry. rpc :DeleteEntry, ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Google::Cloud::Dataplex::V1::Entry # Lists Entries within an EntryGroup. - # Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc - # Metastore metadata that is stored in Dataplex Universal Catalog is - # changing. For more information, see [Changes to metadata stored in - # Dataplex Universal - # Catalog](https://cloud.google.com/dataplex/docs/metadata-changes). rpc :ListEntries, ::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Google::Cloud::Dataplex::V1::ListEntriesResponse # Gets an Entry. - # Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc - # Metastore metadata that is stored in Dataplex Universal Catalog is - # changing. For more information, see [Changes to metadata stored in - # Dataplex Universal - # Catalog](https://cloud.google.com/dataplex/docs/metadata-changes). rpc :GetEntry, ::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Google::Cloud::Dataplex::V1::Entry # Looks up an entry by name using the permission on the source system. - # Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc - # Metastore metadata that is stored in Dataplex Universal Catalog is - # changing. For more information, see [Changes to metadata stored in - # Dataplex Universal - # Catalog](https://cloud.google.com/dataplex/docs/metadata-changes). rpc :LookupEntry, ::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Google::Cloud::Dataplex::V1::Entry # Searches for Entries matching the given query and scope. rpc :SearchEntries, ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Google::Cloud::Dataplex::V1::SearchEntriesResponse @@ -112,10 +97,26 @@ class Service rpc :CancelMetadataJob, ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest, ::Google::Protobuf::Empty # Creates an Entry Link. rpc :CreateEntryLink, ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest, ::Google::Cloud::Dataplex::V1::EntryLink + # Updates an Entry Link. + rpc :UpdateEntryLink, ::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest, ::Google::Cloud::Dataplex::V1::EntryLink # Deletes an Entry Link. rpc :DeleteEntryLink, ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest, ::Google::Cloud::Dataplex::V1::EntryLink + # Looks up Entry Links referencing the specified Entry. + rpc :LookupEntryLinks, ::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest, ::Google::Cloud::Dataplex::V1::LookupEntryLinksResponse + # Looks up LLM Context for the specified resources. + rpc :LookupContext, ::Google::Cloud::Dataplex::V1::LookupContextRequest, ::Google::Cloud::Dataplex::V1::LookupContextResponse # Gets an Entry Link. rpc :GetEntryLink, ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest, ::Google::Cloud::Dataplex::V1::EntryLink + # Creates a MetadataFeed. + rpc :CreateMetadataFeed, ::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest, ::Google::Longrunning::Operation + # Gets a MetadataFeed. + rpc :GetMetadataFeed, ::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest, ::Google::Cloud::Dataplex::V1::MetadataFeed + # Retrieve a list of MetadataFeeds. + rpc :ListMetadataFeeds, ::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest, ::Google::Cloud::Dataplex::V1::ListMetadataFeedsResponse + # Deletes a MetadataFeed. + rpc :DeleteMetadataFeed, ::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest, ::Google::Longrunning::Operation + # Updates a MetadataFeed. + rpc :UpdateMetadataFeed, ::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest, ::Google::Longrunning::Operation end Stub = Service.rpc_stub_class diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb index 5575368264af..e565b64a7f22 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb @@ -17,31 +17,8 @@ descriptor_data = "\n#google/cloud/dataplex/v1/cmek.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\x1fgoogle/protobuf/timestamp.proto\"\xfa\x06\n\x10\x45ncryptionConfig\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x08\xfa\x41*\n(dataplex.googleapis.com/EncryptionConfig\x12\x10\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x01\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\x12Y\n\x10\x65ncryption_state\x18\x05 \x01(\x0e\x32:.google.cloud.dataplex.v1.EncryptionConfig.EncryptionStateB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x12W\n\x0f\x66\x61ilure_details\x18\x07 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.EncryptionConfig.FailureDetailsB\x03\xe0\x41\x03\x12(\n\x1b\x65nable_metastore_encryption\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xd1\x01\n\x0e\x46\x61ilureDetails\x12\\\n\nerror_code\x18\x01 \x01(\x0e\x32\x43.google.cloud.dataplex.v1.EncryptionConfig.FailureDetails.ErrorCodeB\x03\xe0\x41\x03\x12\x1a\n\rerror_message\x18\x02 \x01(\tB\x03\xe0\x41\x03\"E\n\tErrorCode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x17\n\x13REQUIRE_USER_ACTION\x10\x02\"^\n\x0f\x45ncryptionState\x12 \n\x1c\x45NCRYPTION_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nENCRYPTING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03:\x87\x01\xea\x41\x83\x01\n(dataplex.googleapis.com/EncryptionConfig\x12Worganizations/{organization}/locations/{location}/encryptionConfigs/{encryption_config}\"\xd4\x01\n\x1d\x43reateEncryptionConfigRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,dataplex.googleapis.com/OrganizationLocation\x12!\n\x14\x65ncryption_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x11\x65ncryption_config\x18\x03 \x01(\x0b\x32*.google.cloud.dataplex.v1.EncryptionConfigB\x03\xe0\x41\x02\"\\\n\x1aGetEncryptionConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(dataplex.googleapis.com/EncryptionConfig\"\xa1\x01\n\x1dUpdateEncryptionConfigRequest\x12J\n\x11\x65ncryption_config\x18\x01 \x01(\x0b\x32*.google.cloud.dataplex.v1.EncryptionConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"r\n\x1d\x44\x65leteEncryptionConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(dataplex.googleapis.com/EncryptionConfig\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xbd\x01\n\x1cListEncryptionConfigsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(dataplex.googleapis.com/EncryptionConfig\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\"\xc7\x01\n\x1dListEncryptionConfigsResponse\x12\x46\n\x12\x65ncryption_configs\x18\x01 \x03(\x0b\x32*.google.cloud.dataplex.v1.EncryptionConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x45\n\x15unreachable_locations\x18\x03 \x03(\tB&\xfa\x41#\n!locations.googleapis.com/Location2\xaa\n\n\x0b\x43mekService\x12\xa0\x02\n\x16\x43reateEncryptionConfig\x12\x37.google.cloud.dataplex.v1.CreateEncryptionConfigRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41%\n\x10\x45ncryptionConfig\x12\x11OperationMetadata\xda\x41-parent,encryption_config,encryption_config_id\x82\xd3\xe4\x93\x02O\":/v1/{parent=organizations/*/locations/*}/encryptionConfigs:\x11\x65ncryption_config\x12\xa2\x02\n\x16UpdateEncryptionConfig\x12\x37.google.cloud.dataplex.v1.UpdateEncryptionConfigRequest\x1a\x1d.google.longrunning.Operation\"\xaf\x01\xca\x41%\n\x10\x45ncryptionConfig\x12\x11OperationMetadata\xda\x41\x1d\x65ncryption_config,update_mask\x82\xd3\xe4\x93\x02\x61\x32L/v1/{encryption_config.name=organizations/*/locations/*/encryptionConfigs/*}:\x11\x65ncryption_config\x12\xe8\x01\n\x16\x44\x65leteEncryptionConfig\x12\x37.google.cloud.dataplex.v1.DeleteEncryptionConfigRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=organizations/*/locations/*/encryptionConfigs/*}\x12\xd5\x01\n\x15ListEncryptionConfigs\x12\x36.google.cloud.dataplex.v1.ListEncryptionConfigsRequest\x1a\x37.google.cloud.dataplex.v1.ListEncryptionConfigsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=organizations/*/locations/*}/encryptionConfigs\x12\xc2\x01\n\x13GetEncryptionConfig\x12\x34.google.cloud.dataplex.v1.GetEncryptionConfigRequest\x1a*.google.cloud.dataplex.v1.EncryptionConfig\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=organizations/*/locations/*/encryptionConfigs/*}\x1aK\xca\x41\x17\x64\x61taplex.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x9d\x02\n\x1c\x63om.google.cloud.dataplex.v1B\tCmekProtoP\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::V1\xea\x41\x61\n,dataplex.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}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.protobuf.Timestamp", "google/protobuf/timestamp.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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb index 972edf974184..78c3076cb22a 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb @@ -8,52 +8,17 @@ 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. + # Deletes a data product. The deletion will fail if the data product is not + # empty (i.e. contains at least one data asset). # - # @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. + # @overload delete_data_product(request, options = nil) + # Pass arguments to `delete_data_product` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataProductRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataProductRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload delete_data_product(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_data_product` via keyword arguments. Note that at # least one keyword argument is 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 name [::String] + # Required. The name of the data product to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} + # @param etag [::String] + # Optional. The etag of the data product. + # + # If an etag is provided and does not match the current etag of the data + # product, then the deletion will be blocked and an ABORTED error will be + # returned. # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. + # Optional. Validates the request without actually deleting the data product. + # Default: false. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Cloud::Dataplex::V1::Content] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -374,27 +384,34 @@ def create_content request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::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 + # request = Google::Cloud::Dataplex::V1::DeleteDataProductRequest.new + # + # # Call the delete_data_product method. + # result = client.delete_data_product request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_content request, options = nil + def delete_data_product request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataProductRequest # Converts hash and nil to 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 + metadata = @config.rpcs.delete_data_product.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -404,55 +421,58 @@ def update_content request, options = nil 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 + 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.update_content.timeout, + options.apply_defaults timeout: @config.rpcs.delete_data_product.timeout, metadata: metadata, - retry_policy: @config.rpcs.update_content.retry_policy + retry_policy: @config.rpcs.delete_data_product.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| + @data_product_service_stub.call_rpc :delete_data_product, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? + throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## - # Delete a content. + # Gets a data product. # - # @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. + # @overload get_data_product(request, options = nil) + # Pass arguments to `get_data_product` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataProductRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::GetDataProductRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload get_data_product(name: nil) + # Pass arguments to `get_data_product` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep 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} + # Required. The name of the data product to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataProduct] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataplex::V1::DataProduct] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -460,27 +480,27 @@ def update_content request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new + # request = Google::Cloud::Dataplex::V1::GetDataProductRequest.new # - # # Call the delete_content method. - # result = client.delete_content request + # # Call the get_data_product method. + # result = client.get_data_product request # - # # The returned object is of type Google::Protobuf::Empty. + # # The returned object is of type Google::Cloud::Dataplex::V1::DataProduct. # p result # - def delete_content request, options = nil + def get_data_product request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataProductRequest # Converts hash and nil to 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 + metadata = @config.rpcs.get_data_product.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -497,15 +517,15 @@ def delete_content request, options = nil request_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, + options.apply_defaults timeout: @config.rpcs.get_data_product.timeout, metadata: metadata, - retry_policy: @config.rpcs.delete_content.retry_policy + retry_policy: @config.rpcs.get_data_product.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| + @data_product_service_stub.call_rpc :get_data_product, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -513,34 +533,62 @@ def delete_content request, options = nil end ## - # Get a content resource. + # Lists data products for a given project. # - # @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. + # @overload list_data_products(request, options = nil) + # Pass arguments to `list_data_products` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataProductsRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::ListDataProductsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload list_data_products(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_data_products` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep 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. + # @param parent [::String] + # Required. The parent, which has this collection of data products. + # + # Format: `projects/{project_id_or_number}/locations/{location_id}`. + # + # Supports listing across all locations with the wildcard `-` (hyphen) + # character. Example: `projects/{project_id_or_number}/locations/-` + # @param filter [::String] + # Optional. Filter expression that filters data products listed in the + # response. + # + # Example of using this filter is: `display_name="my-data-product"` + # @param page_size [::Integer] + # Optional. The maximum number of data products to return. The service may + # return fewer than this value. If unspecified, at most 50 data products will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataProducts` must + # match the call that provided the page token. + # @param order_by [::String] + # Optional. Order by expression that orders data products listed in the + # response. + # + # Supported Order by fields are: `name` or `create_time`. + # + # If not specified, the ordering is undefined. + # + # Ordering by `create_time` is not supported when listing resources across + # locations (i.e. when request contains `/locations/-`). # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Cloud::Dataplex::V1::Content] + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -548,27 +596,31 @@ def delete_content request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetContentRequest.new + # request = Google::Cloud::Dataplex::V1::ListDataProductsRequest.new # - # # Call the get_content method. - # result = client.get_content request + # # Call the list_data_products method. + # result = client.list_data_products request # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataProduct. + # p item + # end # - def get_content request, options = nil + def list_data_products request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataProductsRequest # Converts hash and nil to 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 + metadata = @config.rpcs.list_data_products.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -578,63 +630,64 @@ def get_content request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.name - header_params["name"] = request.name + 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.get_content.timeout, + options.apply_defaults timeout: @config.rpcs.list_data_products.timeout, metadata: metadata, - retry_policy: @config.rpcs.get_content.retry_policy + retry_policy: @config.rpcs.list_data_products.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| + @data_product_service_stub.call_rpc :list_data_products, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_product_service_stub, :list_data_products, request, response, operation, options yield response, operation if block_given? + throw :response, 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. + # Updates a data product. # - # @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. + # @overload update_data_product(request, options = nil) + # Pass arguments to `update_data_product` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataProductRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataProductRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload update_data_product(data_product: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_product` via keyword arguments. Note that at # least one keyword argument is 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`. + # @param data_product [::Google::Cloud::Dataplex::V1::DataProduct, ::Hash] + # Required. The data product to update. + # The data product's `name` field is used to identify the data product to + # update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # If this is empty or not set, then all the fields will be updated. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually updating the data product. + # Default: false. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -642,27 +695,144 @@ def get_content request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new + # request = Google::Cloud::Dataplex::V1::UpdateDataProductRequest.new + # + # # Call the update_data_product method. + # result = client.update_data_product request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request + def update_data_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataProductRequest + + # Converts hash and nil to 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_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_product&.name + header_params["data_product.name"] = request.data_product.name + end + + request_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_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_product_service_stub.call_rpc :update_data_product, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a data asset. # - # # The returned object is of type Google::Iam::V1::Policy. - # p result + # @overload create_data_asset(request, options = nil) + # Pass arguments to `create_data_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_asset(parent: nil, data_asset_id: nil, data_asset: nil, validate_only: nil) + # Pass arguments to `create_data_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). # - def get_iam_policy request, options = nil + # @param parent [::String] + # Required. The parent resource where this data asset will be created. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} + # @param data_asset_id [::String] + # Optional. The ID of the data asset to create. + # + # The ID must conform to RFC-1034 and contain only lower-case letters (a-z), + # numbers (0-9), or hyphens, with the first character a letter, the last a + # letter or a number, and a 63 character maximum. Characters outside of + # ASCII are not permitted. + # Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$` + # If not provided, a system generated ID will be used. + # @param data_asset [::Google::Cloud::Dataplex::V1::DataAsset, ::Hash] + # Required. The data asset to create. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually creating the data asset. + # Defaults to 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::DataProductService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAssetRequest.new + # + # # Call the create_data_asset method. + # result = client.create_data_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_data_asset request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAssetRequest # Converts hash and nil to 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 + metadata = @config.rpcs.create_data_asset.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -672,70 +842,63 @@ def get_iam_policy request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.resource - header_params["resource"] = request.resource + 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.get_iam_policy.timeout, + options.apply_defaults timeout: @config.rpcs.create_data_asset.timeout, metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy + retry_policy: @config.rpcs.create_data_asset.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| + @data_product_service_stub.call_rpc :create_data_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? + throw :response, 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. + # Updates a data asset. # - # @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. + # @overload update_data_asset(request, options = nil) + # Pass arguments to `update_data_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload update_data_asset(data_asset: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_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 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 data_asset [::Google::Cloud::Dataplex::V1::DataAsset, ::Hash] + # Required. The data asset to update. + # The data asset's `name` field is used to identify the data asset to update. # @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"` + # Optional. The list of fields to update. + # If this is empty or not set, then all the fields will be updated. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually updating the data asset. + # Defaults to false. # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -743,27 +906,34 @@ def get_iam_policy request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::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 + # request = Google::Cloud::Dataplex::V1::UpdateDataAssetRequest.new + # + # # Call the update_data_asset method. + # result = client.update_data_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 set_iam_policy request, options = nil + def update_data_asset request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest # Converts hash and nil to 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 + metadata = @config.rpcs.update_data_asset.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -773,69 +943,162 @@ def set_iam_policy request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.resource - header_params["resource"] = request.resource + if request.data_asset&.name + header_params["data_asset.name"] = request.data_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.set_iam_policy.timeout, + options.apply_defaults timeout: @config.rpcs.update_data_asset.timeout, metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy + retry_policy: @config.rpcs.update_data_asset.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| + @data_product_service_stub.call_rpc :update_data_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? + throw :response, 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). + # Deletes a data asset. # - # A caller is not required to have Google IAM permission to make this - # request. + # @overload delete_data_asset(request, options = nil) + # Pass arguments to `delete_data_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_asset(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_data_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 name of the data asset to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}/dataAssets/\\{data_asset_id} + # @param etag [::String] + # Optional. The etag of the data asset. + # If this is provided, it must match the server's etag. + # If the etag is provided and does not match the server-computed etag, + # the request must fail with a ABORTED error code. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually deleting the data asset. + # Defaults to 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::DataProductService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAssetRequest.new + # + # # Call the delete_data_asset method. + # result = client.delete_data_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 # - # 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. + def delete_data_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest + + # Converts hash and nil to 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_asset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_product_service_stub.call_rpc :delete_data_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a data asset. # - # @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. + # @overload get_data_asset(request, options = nil) + # Pass arguments to `get_data_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAssetRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::GetDataAssetRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload get_data_asset(name: nil) + # Pass arguments to `get_data_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 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). + # @param name [::String] + # Required. The name of the data asset to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}/dataAssets/\\{data_asset_id} # # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAsset] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # @return [::Google::Cloud::Dataplex::V1::DataAsset] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -843,27 +1106,27 @@ def set_iam_policy request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new + # request = Google::Cloud::Dataplex::V1::GetDataAssetRequest.new # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request + # # Call the get_data_asset method. + # result = client.get_data_asset request # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAsset. # p result # - def test_iam_permissions request, options = nil + def get_data_asset request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAssetRequest # Converts hash and nil to 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 + metadata = @config.rpcs.get_data_asset.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -873,22 +1136,22 @@ def test_iam_permissions request, options = nil metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} - if request.resource - header_params["resource"] = request.resource + 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.test_iam_permissions.timeout, + options.apply_defaults timeout: @config.rpcs.get_data_asset.timeout, metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy + retry_policy: @config.rpcs.get_data_asset.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| + @data_product_service_stub.call_rpc :get_data_asset, request, options: options do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e @@ -896,51 +1159,54 @@ def test_iam_permissions request, options = nil end ## - # List content. + # Lists data assets for a given data product. # - # @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. + # @overload list_data_assets(request, options = nil) + # Pass arguments to `list_data_assets` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAssetsRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::ListDataAssetsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload list_data_assets(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_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 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. + # Required. The parent, which has this collection of data assets. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} # @param filter [::String] - # Optional. Filter request. Filters are case-sensitive. - # The following formats are supported: + # Optional. Filter expression that filters data assets listed in the + # response. + # @param order_by [::String] + # Optional. Order by expression that orders data assets listed in the + # response. # - # labels.key1 = "value1" - # labels:key1 - # type = "NOTEBOOK" - # type = "SQL_SCRIPT" + # Supported `order_by` fields are: `name` or `create_time`. + # + # If not specified, the ordering is undefined. + # @param page_size [::Integer] + # Optional. The maximum number of data assets to return. The service may + # return fewer than this value. If unspecified, at most 50 data assets will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataAssets` call. + # Provide this to retrieve the subsequent page. # - # These restrictions can be coinjoined with AND, OR and NOT conjunctions. + # When paginating, all other parameters provided to `ListDataAssets` 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::Content>] + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAsset>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAsset>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # @@ -948,31 +1214,31 @@ def test_iam_permissions request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListContentRequest.new + # request = Google::Cloud::Dataplex::V1::ListDataAssetsRequest.new # - # # Call the list_content method. - # result = client.list_content request + # # Call the list_data_assets method. + # result = client.list_data_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::Content. + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAsset. # p item # end # - def list_content request, options = nil + def list_data_assets request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAssetsRequest # Converts hash and nil to 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 + metadata = @config.rpcs.list_data_assets.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -989,16 +1255,16 @@ def list_content request, options = nil request_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, + options.apply_defaults timeout: @config.rpcs.list_data_assets.timeout, metadata: metadata, - retry_policy: @config.rpcs.list_content.retry_policy + retry_policy: @config.rpcs.list_data_assets.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 + @data_product_service_stub.call_rpc :list_data_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_product_service_stub, :list_data_assets, request, response, operation, options yield response, operation if block_given? throw :response, response end @@ -1007,13 +1273,13 @@ def list_content request, options = nil end ## - # Configuration class for the ContentService API. + # Configuration class for the DataProductService API. # - # This class represents the configuration for ContentService, + # This class represents the configuration for DataProductService, # 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} + # {::Google::Cloud::Dataplex::V1::DataProductService::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 @@ -1022,17 +1288,17 @@ def list_content request, options = nil # @example # # # Modify the global config, setting the timeout for - # # create_content to 20 seconds, + # # create_data_product to 20 seconds, # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config| + # ::Google::Cloud::Dataplex::V1::DataProductService::Client.configure do |config| # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 + # config.rpcs.create_data_product.timeout = 20.0 # end # # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 + # config.rpcs.create_data_product.timeout = 20.0 # end # # @!attribute [rw] endpoint @@ -1064,7 +1330,7 @@ def list_content request, options = nil # json_key_io: ::File.open("/path/to/keyfile.json") # ) # - # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| # config.credentials = credentials # end # @@ -1172,7 +1438,7 @@ def channel_pool end ## - # Configuration RPC class for the ContentService API. + # Configuration RPC class for the DataProductService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes @@ -1190,64 +1456,78 @@ def channel_pool # class Rpcs ## - # RPC-specific configuration for `create_content` + # RPC-specific configuration for `create_data_product` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_product + ## + # RPC-specific configuration for `delete_data_product` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_product + ## + # RPC-specific configuration for `get_data_product` # @return [::Gapic::Config::Method] # - attr_reader :create_content + attr_reader :get_data_product ## - # RPC-specific configuration for `update_content` + # RPC-specific configuration for `list_data_products` # @return [::Gapic::Config::Method] # - attr_reader :update_content + attr_reader :list_data_products ## - # RPC-specific configuration for `delete_content` + # RPC-specific configuration for `update_data_product` # @return [::Gapic::Config::Method] # - attr_reader :delete_content + attr_reader :update_data_product ## - # RPC-specific configuration for `get_content` + # RPC-specific configuration for `create_data_asset` # @return [::Gapic::Config::Method] # - attr_reader :get_content + attr_reader :create_data_asset ## - # RPC-specific configuration for `get_iam_policy` + # RPC-specific configuration for `update_data_asset` # @return [::Gapic::Config::Method] # - attr_reader :get_iam_policy + attr_reader :update_data_asset ## - # RPC-specific configuration for `set_iam_policy` + # RPC-specific configuration for `delete_data_asset` # @return [::Gapic::Config::Method] # - attr_reader :set_iam_policy + attr_reader :delete_data_asset ## - # RPC-specific configuration for `test_iam_permissions` + # RPC-specific configuration for `get_data_asset` # @return [::Gapic::Config::Method] # - attr_reader :test_iam_permissions + attr_reader :get_data_asset ## - # RPC-specific configuration for `list_content` + # RPC-specific configuration for `list_data_assets` # @return [::Gapic::Config::Method] # - attr_reader :list_content + attr_reader :list_data_assets # @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 + create_data_product_config = parent_rpcs.create_data_product if parent_rpcs.respond_to? :create_data_product + @create_data_product = ::Gapic::Config::Method.new create_data_product_config + delete_data_product_config = parent_rpcs.delete_data_product if parent_rpcs.respond_to? :delete_data_product + @delete_data_product = ::Gapic::Config::Method.new delete_data_product_config + get_data_product_config = parent_rpcs.get_data_product if parent_rpcs.respond_to? :get_data_product + @get_data_product = ::Gapic::Config::Method.new get_data_product_config + list_data_products_config = parent_rpcs.list_data_products if parent_rpcs.respond_to? :list_data_products + @list_data_products = ::Gapic::Config::Method.new list_data_products_config + update_data_product_config = parent_rpcs.update_data_product if parent_rpcs.respond_to? :update_data_product + @update_data_product = ::Gapic::Config::Method.new update_data_product_config + create_data_asset_config = parent_rpcs.create_data_asset if parent_rpcs.respond_to? :create_data_asset + @create_data_asset = ::Gapic::Config::Method.new create_data_asset_config + update_data_asset_config = parent_rpcs.update_data_asset if parent_rpcs.respond_to? :update_data_asset + @update_data_asset = ::Gapic::Config::Method.new update_data_asset_config + delete_data_asset_config = parent_rpcs.delete_data_asset if parent_rpcs.respond_to? :delete_data_asset + @delete_data_asset = ::Gapic::Config::Method.new delete_data_asset_config + get_data_asset_config = parent_rpcs.get_data_asset if parent_rpcs.respond_to? :get_data_asset + @get_data_asset = ::Gapic::Config::Method.new get_data_asset_config + list_data_assets_config = parent_rpcs.list_data_assets if parent_rpcs.respond_to? :list_data_assets + @list_data_assets = ::Gapic::Config::Method.new list_data_assets_config yield self if block_given? end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb similarity index 91% rename from google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb index 2e442e2b4f72..b57ee714470f 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,8 +22,8 @@ module Google module Cloud module Dataplex module V1 - module ContentService - # Credentials for the ContentService API. + module DataProductService + # Credentials for the DataProductService API. class Credentials < ::Google::Auth::Credentials self.scope = [ "https://www.googleapis.com/auth/cloud-platform" diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/operations.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/operations.rb new file mode 100644 index 000000000000..800f3d4f9f2e --- /dev/null +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 DataProductService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataProductService 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 DataProductService 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`. + # + # @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, return_partial_success: 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. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @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, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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? + throw :response, 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, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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? + throw :response, 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, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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? + 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, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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? + 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, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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? + throw :response, 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: + # * (`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 + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-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] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,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, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + 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 + config_attr :logger, :default, ::Logger, nil, :default + + # @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/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb similarity index 51% rename from google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb index cfd9a8495554..c708a5f9d497 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,47 +21,64 @@ module Google module Cloud module Dataplex module V1 - module ContentService - # Path helper methods for the ContentService API. + module DataProductService + # Path helper methods for the DataProductService API. module Paths ## - # Create a fully-qualified Content resource string. + # Create a fully-qualified DataAsset resource string. # # The resource will be in the following format: # - # `projects/{project}/locations/{location}/lakes/{lake}/content/{content}` + # `projects/{project}/locations/{location}/dataProducts/{data_product}/dataAssets/{data_asset}` # # @param project [String] # @param location [String] - # @param lake [String] - # @param content [String] + # @param data_product [String] + # @param data_asset [String] # # @return [::String] - def content_path project:, location:, lake:, content: + def data_asset_path project:, location:, data_product:, data_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, "data_product cannot contain /" if data_product.to_s.include? "/" - "projects/#{project}/locations/#{location}/lakes/#{lake}/content/#{content}" + "projects/#{project}/locations/#{location}/dataProducts/#{data_product}/dataAssets/#{data_asset}" end ## - # Create a fully-qualified Lake resource string. + # Create a fully-qualified DataProduct resource string. # # The resource will be in the following format: # - # `projects/{project}/locations/{location}/lakes/{lake}` + # `projects/{project}/locations/{location}/dataProducts/{data_product}` # # @param project [String] # @param location [String] - # @param lake [String] + # @param data_product [String] # # @return [::String] - def lake_path project:, location:, lake: + def data_product_path project:, location:, data_product: 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}" + "projects/#{project}/locations/#{location}/dataProducts/#{data_product}" + 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 diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb similarity index 61% rename from google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb index aca3fba7ad90..cf951758b07d 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,24 +23,25 @@ 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" +require "google/cloud/dataplex/v1/data_product_service/credentials" +require "google/cloud/dataplex/v1/data_product_service/paths" +require "google/cloud/dataplex/v1/data_product_service/rest/operations" +require "google/cloud/dataplex/v1/data_product_service/rest/client" module Google module Cloud module Dataplex module V1 ## - # ContentService manages Notebook and SQL Scripts for Dataplex Universal - # Catalog. + # `DataProductService` provides APIs for managing data products and + # the underlying data assets. # # 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 + # require "google/cloud/dataplex/v1/data_product_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new # - module ContentService + module DataProductService # Client for the REST transport module Rest end @@ -51,4 +52,4 @@ module Rest end helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/content_service/rest/helpers" if ::File.file? helper_path +require "google/cloud/dataplex/v1/data_product_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb similarity index 51% rename from google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb index 0f57627a4a87..2a28e3fdd5bb 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ # 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/dataplex/v1/data_products_pb" +require "google/cloud/dataplex/v1/data_product_service/rest/service_stub" require "google/cloud/location/rest" require "google/iam/v1/rest" @@ -26,13 +26,13 @@ module Google module Cloud module Dataplex module V1 - module ContentService + module DataProductService module Rest ## - # REST client for the ContentService service. + # REST client for the DataProductService service. # - # ContentService manages Notebook and SQL Scripts for Dataplex Universal - # Catalog. + # `DataProductService` provides APIs for managing data products and + # the underlying data assets. # class Client # @private @@ -44,18 +44,18 @@ class Client include Paths # @private - attr_reader :content_service_stub + attr_reader :data_product_service_stub ## - # Configure the ContentService Client class. + # Configure the DataProductService Client class. # - # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} + # See {::Google::Cloud::Dataplex::V1::DataProductService::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| + # # Modify the configuration for all DataProductService clients + # ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.configure do |config| # config.timeout = 10.0 # end # @@ -75,34 +75,6 @@ def self.configure 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? @@ -110,13 +82,13 @@ def self.configure end ## - # Configure the ContentService Client instance. + # Configure the DataProductService 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} + # See {::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client::Configuration} # for a description of the configuration fields. # # @yield [config] Configure the Client client. @@ -135,23 +107,23 @@ def configure # @return [String] # def universe_domain - @content_service_stub.universe_domain + @data_product_service_stub.universe_domain end ## - # Create a new ContentService REST client object. + # Create a new DataProductService REST client object. # # @example # # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new # # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| # config.timeout = 10.0 # end # - # @yield [config] Configure the ContentService client. + # @yield [config] Configure the DataProductService client. # @yieldparam config [Client::Configuration] # def initialize @@ -177,7 +149,14 @@ def initialize @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( + @operations_client = ::Google::Cloud::Dataplex::V1::DataProductService::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_product_service_stub = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, @@ -185,7 +164,7 @@ def initialize logger: @config.logger ) - @content_service_stub.logger(stub: true)&.info do |entry| + @data_product_service_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry.message = "Created client for #{entry.service}" @@ -198,22 +177,29 @@ def initialize @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.endpoint = @data_product_service_stub.endpoint + config.universe_domain = @data_product_service_stub.universe_domain config.bindings_override = @config.bindings_override - config.logger = @content_service_stub.logger if config.respond_to? :logger= + config.logger = @data_product_service_stub.logger if config.respond_to? :logger= 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.endpoint = @data_product_service_stub.endpoint + config.universe_domain = @data_product_service_stub.universe_domain config.bindings_override = @config.bindings_override - config.logger = @content_service_stub.logger if config.respond_to? :logger= + config.logger = @data_product_service_stub.logger if config.respond_to? :logger= end end + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataProductService::Rest::Operations] + # + attr_reader :operations_client + ## # Get the associated client for mix-in of the Locations. # @@ -234,42 +220,51 @@ def initialize # @return [Logger] # def logger - @content_service_stub.logger + @data_product_service_stub.logger end # Service calls ## - # Create a content. + # Creates a data product. # - # @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. + # @overload create_data_product(request, options = nil) + # Pass arguments to `create_data_product` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataProductRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::CreateDataProductRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload create_data_product(parent: nil, data_product_id: nil, data_product: nil, validate_only: nil) + # Pass arguments to `create_data_product` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep 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. + # Required. The parent resource where this data product will be created. + # Format: projects/\\{project_id_or_number}/locations/\\{location_id} + # @param data_product_id [::String] + # Optional. The ID of the data product to create. + # + # The ID must conform to RFC-1034 and contain only lower-case letters (a-z), + # numbers (0-9), or hyphens, with the first character a letter, the last a + # letter or a number, and a 63 character maximum. Characters outside of + # ASCII are not permitted. + # Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$` + # If not provided, a system generated ID will be used. + # @param data_product [::Google::Cloud::Dataplex::V1::DataProduct, ::Hash] + # Required. The data product to create. # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. + # Optional. Validates the request without actually creating the data product. + # Default: false. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataplex::V1::Content] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -277,27 +272,34 @@ def logger # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::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 + # request = Google::Cloud::Dataplex::V1::CreateDataProductRequest.new + # + # # Call the create_data_product method. + # result = client.create_data_product request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_content request, options = nil + def create_data_product request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateContentRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataProductRequest # Converts hash and nil to an 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 + call_metadata = @config.rpcs.create_data_product.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -308,52 +310,60 @@ def create_content request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.create_content.timeout, + options.apply_defaults timeout: @config.rpcs.create_data_product.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.create_content.retry_policy + retry_policy: @config.rpcs.create_data_product.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| + @data_product_service_stub.create_data_product request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? + throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end ## - # Update a content. Only supports full resource update. + # Deletes a data product. The deletion will fail if the data product is not + # empty (i.e. contains at least one data asset). # - # @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. + # @overload delete_data_product(request, options = nil) + # Pass arguments to `delete_data_product` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataProductRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataProductRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload delete_data_product(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_data_product` via keyword arguments. Note that at # least one keyword argument is 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 name [::String] + # Required. The name of the data product to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} + # @param etag [::String] + # Optional. The etag of the data product. + # + # If an etag is provided and does not match the current etag of the data + # product, then the deletion will be blocked and an ABORTED error will be + # returned. # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. + # Optional. Validates the request without actually deleting the data product. + # Default: false. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataplex::V1::Content] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -361,27 +371,34 @@ def create_content request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::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 + # request = Google::Cloud::Dataplex::V1::DeleteDataProductRequest.new + # + # # Call the delete_data_product method. + # result = client.delete_data_product request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_content request, options = nil + def delete_data_product request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataProductRequest # Converts hash and nil to an 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 + call_metadata = @config.rpcs.delete_data_product.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -392,47 +409,50 @@ def update_content request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.update_content.timeout, + options.apply_defaults timeout: @config.rpcs.delete_data_product.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.update_content.retry_policy + retry_policy: @config.rpcs.delete_data_product.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| + @data_product_service_stub.delete_data_product request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? + throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end ## - # Delete a content. + # Gets a data product. # - # @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. + # @overload get_data_product(request, options = nil) + # Pass arguments to `get_data_product` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataProductRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::GetDataProductRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload get_data_product(name: nil) + # Pass arguments to `get_data_product` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep 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} + # Required. The name of the data product to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataProduct] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataplex::V1::DataProduct] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -440,27 +460,27 @@ def update_content request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new + # request = Google::Cloud::Dataplex::V1::GetDataProductRequest.new # - # # Call the delete_content method. - # result = client.delete_content request + # # Call the get_data_product method. + # result = client.get_data_product request # - # # The returned object is of type Google::Protobuf::Empty. + # # The returned object is of type Google::Cloud::Dataplex::V1::DataProduct. # p result # - def delete_content request, options = nil + def get_data_product request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataProductRequest # Converts hash and nil to an 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 + call_metadata = @config.rpcs.get_data_product.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -471,15 +491,15 @@ def delete_content request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.delete_content.timeout, + options.apply_defaults timeout: @config.rpcs.get_data_product.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.delete_content.retry_policy + retry_policy: @config.rpcs.get_data_product.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| + @data_product_service_stub.get_data_product request, options do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e @@ -487,33 +507,61 @@ def delete_content request, options = nil end ## - # Get a content resource. + # Lists data products for a given project. # - # @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. + # @overload list_data_products(request, options = nil) + # Pass arguments to `list_data_products` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataProductsRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::ListDataProductsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload list_data_products(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_data_products` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep 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. + # @param parent [::String] + # Required. The parent, which has this collection of data products. + # + # Format: `projects/{project_id_or_number}/locations/{location_id}`. + # + # Supports listing across all locations with the wildcard `-` (hyphen) + # character. Example: `projects/{project_id_or_number}/locations/-` + # @param filter [::String] + # Optional. Filter expression that filters data products listed in the + # response. + # + # Example of using this filter is: `display_name="my-data-product"` + # @param page_size [::Integer] + # Optional. The maximum number of data products to return. The service may + # return fewer than this value. If unspecified, at most 50 data products will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataProducts` must + # match the call that provided the page token. + # @param order_by [::String] + # Optional. Order by expression that orders data products listed in the + # response. + # + # Supported Order by fields are: `name` or `create_time`. + # + # If not specified, the ordering is undefined. + # + # Ordering by `create_time` is not supported when listing resources across + # locations (i.e. when request contains `/locations/-`). # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataplex::V1::Content] + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -521,27 +569,31 @@ def delete_content request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetContentRequest.new + # request = Google::Cloud::Dataplex::V1::ListDataProductsRequest.new # - # # Call the get_content method. - # result = client.get_content request + # # Call the list_data_products method. + # result = client.list_data_products request # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataProduct. + # p item + # end # - def get_content request, options = nil + def list_data_products request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataProductsRequest # Converts hash and nil to an 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 + call_metadata = @config.rpcs.list_data_products.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -552,55 +604,56 @@ def get_content request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.get_content.timeout, + options.apply_defaults timeout: @config.rpcs.list_data_products.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.get_content.retry_policy + retry_policy: @config.rpcs.list_data_products.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| + @data_product_service_stub.list_data_products request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_product_service_stub, :list_data_products, "data_products", request, result, options yield result, operation if block_given? + throw :response, 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. + # Updates a data product. # - # @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. + # @overload update_data_product(request, options = nil) + # Pass arguments to `update_data_product` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataProductRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataProductRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload update_data_product(data_product: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_product` via keyword arguments. Note that at # least one keyword argument is 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`. + # @param data_product [::Google::Cloud::Dataplex::V1::DataProduct, ::Hash] + # Required. The data product to update. + # The data product's `name` field is used to identify the data product to + # update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # If this is empty or not set, then all the fields will be updated. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually updating the data product. + # Default: false. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -608,27 +661,137 @@ def get_content request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new + # request = Google::Cloud::Dataplex::V1::UpdateDataProductRequest.new + # + # # Call the update_data_product method. + # result = client.update_data_product request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataProductRequest + + # Converts hash and nil to an 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_product.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_data_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_product_service_stub.update_data_product request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a data asset. # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request + # @overload create_data_asset(request, options = nil) + # Pass arguments to `create_data_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAssetRequest} or an equivalent Hash. # - # # The returned object is of type Google::Iam::V1::Policy. - # p result + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - def get_iam_policy request, options = nil + # @overload create_data_asset(parent: nil, data_asset_id: nil, data_asset: nil, validate_only: nil) + # Pass arguments to `create_data_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 parent resource where this data asset will be created. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} + # @param data_asset_id [::String] + # Optional. The ID of the data asset to create. + # + # The ID must conform to RFC-1034 and contain only lower-case letters (a-z), + # numbers (0-9), or hyphens, with the first character a letter, the last a + # letter or a number, and a 63 character maximum. Characters outside of + # ASCII are not permitted. + # Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$` + # If not provided, a system generated ID will be used. + # @param data_asset [::Google::Cloud::Dataplex::V1::DataAsset, ::Hash] + # Required. The data asset to create. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually creating the data asset. + # Defaults to 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::DataProductService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAssetRequest.new + # + # # Call the create_data_asset method. + # result = client.create_data_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_data_asset request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAssetRequest # Converts hash and nil to an 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 + call_metadata = @config.rpcs.create_data_asset.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -639,62 +802,55 @@ def get_iam_policy request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + options.apply_defaults timeout: @config.rpcs.create_data_asset.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy + retry_policy: @config.rpcs.create_data_asset.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| + @data_product_service_stub.create_data_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? + throw :response, 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. + # Updates a data asset. # - # @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. + # @overload update_data_asset(request, options = nil) + # Pass arguments to `update_data_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest} or an equivalent Hash. # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload update_data_asset(data_asset: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_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 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 data_asset [::Google::Cloud::Dataplex::V1::DataAsset, ::Hash] + # Required. The data asset to update. + # The data asset's `name` field is used to identify the data asset to update. # @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"` + # Optional. The list of fields to update. + # If this is empty or not set, then all the fields will be updated. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually updating the data asset. + # Defaults to false. # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -702,27 +858,34 @@ def get_iam_policy request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::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 + # request = Google::Cloud::Dataplex::V1::UpdateDataAssetRequest.new + # + # # Call the update_data_asset method. + # result = client.update_data_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 set_iam_policy request, options = nil + def update_data_asset request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest # Converts hash and nil to an 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 + call_metadata = @config.rpcs.update_data_asset.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -733,61 +896,147 @@ def set_iam_policy request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + options.apply_defaults timeout: @config.rpcs.update_data_asset.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy + retry_policy: @config.rpcs.update_data_asset.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| + @data_product_service_stub.update_data_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? + throw :response, 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). + # Deletes a data asset. + # + # @overload delete_data_asset(request, options = nil) + # Pass arguments to `delete_data_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest} or an equivalent Hash. # - # A caller is not required to have Google IAM permission to make this - # request. + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # 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 delete_data_asset(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_data_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). # - # @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 name [::String] + # Required. The name of the data asset to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}/dataAssets/\\{data_asset_id} + # @param etag [::String] + # Optional. The etag of the data asset. + # If this is provided, it must match the server's etag. + # If the etag is provided and does not match the server-computed etag, + # the request must fail with a ABORTED error code. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually deleting the data asset. + # Defaults to 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::DataProductService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAssetRequest.new + # + # # Call the delete_data_asset method. + # result = client.delete_data_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 # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + def delete_data_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest + + # Converts hash and nil to an 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_asset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_data_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_product_service_stub.delete_data_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a data asset. + # + # @overload get_data_asset(request, options = nil) + # Pass arguments to `get_data_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAssetRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload get_data_asset(name: nil) + # Pass arguments to `get_data_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 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). + # @param name [::String] + # Required. The name of the data asset to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}/dataAssets/\\{data_asset_id} # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAsset] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # @return [::Google::Cloud::Dataplex::V1::DataAsset] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -795,27 +1044,27 @@ def set_iam_policy request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new + # request = Google::Cloud::Dataplex::V1::GetDataAssetRequest.new # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request + # # Call the get_data_asset method. + # result = client.get_data_asset request # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAsset. # p result # - def test_iam_permissions request, options = nil + def get_data_asset request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAssetRequest # Converts hash and nil to an 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 + call_metadata = @config.rpcs.get_data_asset.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -826,15 +1075,15 @@ def test_iam_permissions request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + options.apply_defaults timeout: @config.rpcs.get_data_asset.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy + retry_policy: @config.rpcs.get_data_asset.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| + @data_product_service_stub.get_data_asset request, options do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e @@ -842,50 +1091,53 @@ def test_iam_permissions request, options = nil end ## - # List content. + # Lists data assets for a given data product. # - # @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. + # @overload list_data_assets(request, options = nil) + # Pass arguments to `list_data_assets` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAssetsRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] + # @param request [::Google::Cloud::Dataplex::V1::ListDataAssetsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter 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 + # @overload list_data_assets(parent: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_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 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. + # Required. The parent, which has this collection of data assets. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} # @param filter [::String] - # Optional. Filter request. Filters are case-sensitive. - # The following formats are supported: + # Optional. Filter expression that filters data assets listed in the + # response. + # @param order_by [::String] + # Optional. Order by expression that orders data assets listed in the + # response. + # + # Supported `order_by` fields are: `name` or `create_time`. # - # labels.key1 = "value1" - # labels:key1 - # type = "NOTEBOOK" - # type = "SQL_SCRIPT" + # If not specified, the ordering is undefined. + # @param page_size [::Integer] + # Optional. The maximum number of data assets to return. The service may + # return fewer than this value. If unspecified, at most 50 data assets will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataAssets` call. + # Provide this to retrieve the subsequent page. # - # These restrictions can be coinjoined with AND, OR and NOT conjunctions. + # When paginating, all other parameters provided to `ListDataAssets` 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::Content>] + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAsset>] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAsset>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -893,31 +1145,31 @@ def test_iam_permissions request, options = nil # 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 + # client = Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListContentRequest.new + # request = Google::Cloud::Dataplex::V1::ListDataAssetsRequest.new # - # # Call the list_content method. - # result = client.list_content request + # # Call the list_data_assets method. + # result = client.list_data_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::Content. + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAsset. # p item # end # - def list_content request, options = nil + def list_data_assets request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAssetsRequest # Converts hash and nil to an 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 + call_metadata = @config.rpcs.list_data_assets.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -928,16 +1180,16 @@ def list_content request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.list_content.timeout, + options.apply_defaults timeout: @config.rpcs.list_data_assets.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.list_content.retry_policy + retry_policy: @config.rpcs.list_data_assets.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 + @data_product_service_stub.list_data_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_product_service_stub, :list_data_assets, "data_assets", request, result, options yield result, operation if block_given? throw :response, result end @@ -946,13 +1198,13 @@ def list_content request, options = nil end ## - # Configuration class for the ContentService REST API. + # Configuration class for the DataProductService REST API. # - # This class represents the configuration for ContentService REST, + # This class represents the configuration for DataProductService 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} + # {::Google::Cloud::Dataplex::V1::DataProductService::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 @@ -961,17 +1213,17 @@ def list_content request, options = nil # @example # # # Modify the global config, setting the timeout for - # # create_content to 20 seconds, + # # create_data_product to 20 seconds, # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| + # ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.configure do |config| # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 + # config.rpcs.create_data_product.timeout = 20.0 # end # # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 + # config.rpcs.create_data_product.timeout = 20.0 # end # # @!attribute [rw] endpoint @@ -1081,7 +1333,7 @@ def rpcs end ## - # Configuration RPC class for the ContentService API. + # Configuration RPC class for the DataProductService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes @@ -1099,64 +1351,78 @@ def rpcs # class Rpcs ## - # RPC-specific configuration for `create_content` + # RPC-specific configuration for `create_data_product` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_product + ## + # RPC-specific configuration for `delete_data_product` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_product + ## + # RPC-specific configuration for `get_data_product` # @return [::Gapic::Config::Method] # - attr_reader :create_content + attr_reader :get_data_product ## - # RPC-specific configuration for `update_content` + # RPC-specific configuration for `list_data_products` # @return [::Gapic::Config::Method] # - attr_reader :update_content + attr_reader :list_data_products ## - # RPC-specific configuration for `delete_content` + # RPC-specific configuration for `update_data_product` # @return [::Gapic::Config::Method] # - attr_reader :delete_content + attr_reader :update_data_product ## - # RPC-specific configuration for `get_content` + # RPC-specific configuration for `create_data_asset` # @return [::Gapic::Config::Method] # - attr_reader :get_content + attr_reader :create_data_asset ## - # RPC-specific configuration for `get_iam_policy` + # RPC-specific configuration for `update_data_asset` # @return [::Gapic::Config::Method] # - attr_reader :get_iam_policy + attr_reader :update_data_asset ## - # RPC-specific configuration for `set_iam_policy` + # RPC-specific configuration for `delete_data_asset` # @return [::Gapic::Config::Method] # - attr_reader :set_iam_policy + attr_reader :delete_data_asset ## - # RPC-specific configuration for `test_iam_permissions` + # RPC-specific configuration for `get_data_asset` # @return [::Gapic::Config::Method] # - attr_reader :test_iam_permissions + attr_reader :get_data_asset ## - # RPC-specific configuration for `list_content` + # RPC-specific configuration for `list_data_assets` # @return [::Gapic::Config::Method] # - attr_reader :list_content + attr_reader :list_data_assets # @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 + create_data_product_config = parent_rpcs.create_data_product if parent_rpcs.respond_to? :create_data_product + @create_data_product = ::Gapic::Config::Method.new create_data_product_config + delete_data_product_config = parent_rpcs.delete_data_product if parent_rpcs.respond_to? :delete_data_product + @delete_data_product = ::Gapic::Config::Method.new delete_data_product_config + get_data_product_config = parent_rpcs.get_data_product if parent_rpcs.respond_to? :get_data_product + @get_data_product = ::Gapic::Config::Method.new get_data_product_config + list_data_products_config = parent_rpcs.list_data_products if parent_rpcs.respond_to? :list_data_products + @list_data_products = ::Gapic::Config::Method.new list_data_products_config + update_data_product_config = parent_rpcs.update_data_product if parent_rpcs.respond_to? :update_data_product + @update_data_product = ::Gapic::Config::Method.new update_data_product_config + create_data_asset_config = parent_rpcs.create_data_asset if parent_rpcs.respond_to? :create_data_asset + @create_data_asset = ::Gapic::Config::Method.new create_data_asset_config + update_data_asset_config = parent_rpcs.update_data_asset if parent_rpcs.respond_to? :update_data_asset + @update_data_asset = ::Gapic::Config::Method.new update_data_asset_config + delete_data_asset_config = parent_rpcs.delete_data_asset if parent_rpcs.respond_to? :delete_data_asset + @delete_data_asset = ::Gapic::Config::Method.new delete_data_asset_config + get_data_asset_config = parent_rpcs.get_data_asset if parent_rpcs.respond_to? :get_data_asset + @get_data_asset = ::Gapic::Config::Method.new get_data_asset_config + list_data_assets_config = parent_rpcs.list_data_assets if parent_rpcs.respond_to? :list_data_assets + @list_data_assets = ::Gapic::Config::Method.new list_data_assets_config yield self if block_given? end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb new file mode 100644 index 000000000000..ea79b01bf669 --- /dev/null +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb @@ -0,0 +1,954 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 DataProductService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataProductService 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 DataProductService 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`. + # + # @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, return_partial_success: 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. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @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, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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? + throw :response, 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, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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? + throw :response, 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, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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? + 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, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + 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? + 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 + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-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] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,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, ::Google::Auth::BaseClient, ::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 + config_attr :logger, :default, ::Logger, nil, :default + + # @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, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + 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, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + 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, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + 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, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + 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] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^organizations/[^/]+/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] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/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] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/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] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb similarity index 65% rename from google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb index ce085e45210c..8e66390d0464 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2023 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,16 +16,16 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -require "google/cloud/dataplex/v1/content_pb" +require "google/cloud/dataplex/v1/data_products_pb" module Google module Cloud module Dataplex module V1 - module ContentService + module DataProductService module Rest ## - # REST service stub for the ContentService service. + # REST service stub for the DataProductService service. # Service stub contains baseline method implementations # including transcoding, making the REST call, and deserialing the response. # @@ -74,23 +74,23 @@ def logger stub: false end ## - # Baseline implementation for the create_content REST call + # Baseline implementation for the create_data_product REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataProductRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default 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 result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataplex::V1::Content] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def create_content request_pb, options = nil + def create_data_product 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 + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_product_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -102,11 +102,11 @@ def create_content request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "create_content", + method_name: "create_data_product", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -114,23 +114,23 @@ def create_content request_pb, options = nil end ## - # Baseline implementation for the update_content REST call + # Baseline implementation for the delete_data_product REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataProductRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default 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 result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataplex::V1::Content] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def update_content request_pb, options = nil + def delete_data_product 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 + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_product_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -142,11 +142,11 @@ def update_content request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "update_content", + method_name: "delete_data_product", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -154,23 +154,23 @@ def update_content request_pb, options = nil end ## - # Baseline implementation for the delete_content REST call + # Baseline implementation for the get_data_product REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataProductRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default 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 result [::Google::Cloud::Dataplex::V1::DataProduct] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataplex::V1::DataProduct] # A result object deserialized from the server's reply - def delete_content request_pb, options = nil + def get_data_product 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 + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_product_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -182,11 +182,11 @@ def delete_content request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "delete_content", + method_name: "get_data_product", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataplex::V1::DataProduct.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -194,23 +194,23 @@ def delete_content request_pb, options = nil end ## - # Baseline implementation for the get_content REST call + # Baseline implementation for the list_data_products REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataProductsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default 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 result [::Google::Cloud::Dataplex::V1::ListDataProductsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataplex::V1::Content] + # @return [::Google::Cloud::Dataplex::V1::ListDataProductsResponse] # A result object deserialized from the server's reply - def get_content request_pb, options = nil + def list_data_products 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 + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_products_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -222,11 +222,11 @@ def get_content request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "get_content", + method_name: "list_data_products", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataplex::V1::ListDataProductsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -234,23 +234,23 @@ def get_content request_pb, options = nil end ## - # Baseline implementation for the get_iam_policy REST call + # Baseline implementation for the update_data_product REST call # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataProductRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default 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 result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil + def update_data_product 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 + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_product_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -262,11 +262,11 @@ def get_iam_policy request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "get_iam_policy", + method_name: "update_data_product", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -274,23 +274,23 @@ def get_iam_policy request_pb, options = nil end ## - # Baseline implementation for the set_iam_policy REST call + # Baseline implementation for the create_data_asset REST call # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAssetRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default 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 result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Iam::V1::Policy] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil + def create_data_asset 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 + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_asset_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -302,11 +302,11 @@ def set_iam_policy request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "set_iam_policy", + method_name: "create_data_asset", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -314,23 +314,23 @@ def set_iam_policy request_pb, options = nil end ## - # Baseline implementation for the test_iam_permissions REST call + # Baseline implementation for the update_data_asset REST call # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default 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 result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil + def update_data_asset 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 + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_asset_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -342,11 +342,11 @@ def test_iam_permissions request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "test_iam_permissions", + method_name: "update_data_asset", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -354,23 +354,23 @@ def test_iam_permissions request_pb, options = nil end ## - # Baseline implementation for the list_content REST call + # Baseline implementation for the delete_data_asset REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default 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 result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataplex::V1::ListContentResponse] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def list_content request_pb, options = nil + def delete_data_asset 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 + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_asset_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -382,11 +382,91 @@ def list_content request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "list_content", + method_name: "delete_data_asset", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListContentResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_data_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::DataAsset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAsset] + # A result object deserialized from the server's reply + def get_data_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_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, + method_name: "get_data_asset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataAsset.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_data_assets REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::ListDataAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAssetsResponse] + # A result object deserialized from the server's reply + def list_data_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_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, + method_name: "list_data_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataAssetsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -396,28 +476,20 @@ def list_content request_pb, options = nil ## # @private # - # GRPC transcoding helper method for the create_content REST call + # GRPC transcoding helper method for the create_data_product REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataProductRequest] # 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 + def self.transcode_create_data_product_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", + uri_template: "/v1/{parent}/dataProducts", + body: "data_product", matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -426,28 +498,19 @@ def self.transcode_create_content_request request_pb ## # @private # - # GRPC transcoding helper method for the update_content REST call + # GRPC transcoding helper method for the delete_data_product REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataProductRequest] # 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 + def self.transcode_delete_data_product_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", + uri_method: :delete, + uri_template: "/v1/{name}", matches: [ - ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ["name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -456,26 +519,19 @@ def self.transcode_update_content_request request_pb ## # @private # - # GRPC transcoding helper method for the delete_content REST call + # GRPC transcoding helper method for the get_data_product REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataProductRequest] # 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 + def self.transcode_get_data_product_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_method: :get, uri_template: "/v1/{name}", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ["name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -484,26 +540,19 @@ def self.transcode_delete_content_request request_pb ## # @private # - # GRPC transcoding helper method for the get_content REST call + # GRPC transcoding helper method for the list_data_products REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataProductsRequest] # 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 + def self.transcode_list_data_products_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}", + uri_template: "/v1/{parent}/dataProducts", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -512,26 +561,20 @@ def self.transcode_get_content_request request_pb ## # @private # - # GRPC transcoding helper method for the get_iam_policy REST call + # GRPC transcoding helper method for the update_data_product REST call # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataProductRequest] # 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 + def self.transcode_update_data_product_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", + uri_method: :patch, + uri_template: "/v1/{data_product.name}", + body: "data_product", matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ["data_product.name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -540,28 +583,20 @@ def self.transcode_get_iam_policy_request request_pb ## # @private # - # GRPC transcoding helper method for the set_iam_policy REST call + # GRPC transcoding helper method for the create_data_asset REST call # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAssetRequest] # 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 + def self.transcode_create_data_asset_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", + uri_template: "/v1/{parent}/dataAssets", + body: "data_asset", 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] + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -570,28 +605,41 @@ def self.transcode_set_iam_policy_request request_pb ## # @private # - # GRPC transcoding helper method for the test_iam_permissions REST call + # GRPC transcoding helper method for the update_data_asset REST call # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest] # 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 + def self.transcode_update_data_asset_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", + uri_method: :patch, + uri_template: "/v1/{data_asset.name}", + body: "data_asset", matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] + ["data_asset.name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/dataAssets/[^/]+/?$}, false] ] ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest] + # 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_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", + uri_method: :delete, + uri_template: "/v1/{name}", matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] + ["name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/dataAssets/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -600,26 +648,40 @@ def self.transcode_test_iam_permissions_request request_pb ## # @private # - # GRPC transcoding helper method for the list_content REST call + # GRPC transcoding helper method for the get_data_asset REST call # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAssetRequest] # 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 + def self.transcode_get_data_asset_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, - uri_template: "/v1/{parent}/contentitems", + uri_template: "/v1/{name}", matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/dataAssets/[^/]+/?$}, false] ] ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_assets REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAssetsRequest] + # 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_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, - uri_template: "/v1/{parent}/content", + uri_template: "/v1/{parent}/dataAssets", matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] ] ) transcoder.transcode request_pb diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_pb.rb new file mode 100644 index 000000000000..457b915184bb --- /dev/null +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_products.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_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/timestamp_pb' + + +descriptor_data = "\n,google/cloud/dataplex/v1/data_products.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.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\x1fgoogle/protobuf/timestamp.proto\"\xc7\x07\n\x0b\x44\x61taProduct\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x19\n\x0c\x64isplay_name\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\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x06labels\x18\x07 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.DataProduct.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04icon\x18\n \x01(\x0c\x42\x03\xe0\x41\x01\x12\x19\n\x0cowner_emails\x18\x0b \x03(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x61sset_count\x18\r \x01(\x05\x42\x03\xe0\x41\x03\x12S\n\raccess_groups\x18\x0e \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataProduct.AccessGroupsEntryB\x03\xe0\x41\x01\x1a\x30\n\tPrincipal\x12\x1b\n\x0cgoogle_group\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x42\x06\n\x04type\x1a\x9c\x01\n\x0b\x41\x63\x63\x65ssGroup\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12G\n\tprincipal\x18\x04 \x01(\x0b\x32/.google.cloud.dataplex.v1.DataProduct.PrincipalB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x66\n\x11\x41\x63\x63\x65ssGroupsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.DataProduct.AccessGroup:\x02\x38\x01:\x89\x01\xea\x41\x85\x01\n#dataplex.googleapis.com/DataProduct\x12\x43projects/{project}/locations/{location}/dataProducts/{data_product}*\x0c\x64\x61taProducts2\x0b\x64\x61taProduct\"\xe3\x05\n\tDataAsset\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x11\n\x04\x65tag\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06labels\x18\x06 \x03(\x0b\x32/.google.cloud.dataplex.v1.DataAsset.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x08resource\x18\x07 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12^\n\x14\x61\x63\x63\x65ss_group_configs\x18\t \x03(\x0b\x32;.google.cloud.dataplex.v1.DataAsset.AccessGroupConfigsEntryB\x03\xe0\x41\x01\x1a+\n\x11\x41\x63\x63\x65ssGroupConfig\x12\x16\n\tiam_roles\x18\x01 \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\x1ap\n\x17\x41\x63\x63\x65ssGroupConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x44\n\x05value\x18\x02 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.DataAsset.AccessGroupConfig:\x02\x38\x01:\x9b\x01\xea\x41\x97\x01\n!dataplex.googleapis.com/DataAsset\x12[projects/{project}/locations/{location}/dataProducts/{data_product}/dataAssets/{data_asset}*\ndataAssets2\tdataAsset\"\xd1\x01\n\x18\x43reateDataProductRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1c\n\x0f\x64\x61ta_product_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12@\n\x0c\x64\x61ta_product\x18\x03 \x01(\x0b\x32%.google.cloud.dataplex.v1.DataProductB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x18\x44\x65leteDataProductRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/DataProduct\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"R\n\x15GetDataProductRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/DataProduct\"\xb1\x01\n\x17ListDataProductsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\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\"\x8b\x01\n\x18ListDataProductsResponse\x12<\n\rdata_products\x18\x01 \x03(\x0b\x32%.google.cloud.dataplex.v1.DataProduct\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\xae\x01\n\x18UpdateDataProductRequest\x12@\n\x0c\x64\x61ta_product\x18\x01 \x01(\x0b\x32%.google.cloud.dataplex.v1.DataProductB\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\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xcb\x01\n\x16\x43reateDataAssetRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/DataProduct\x12\x1a\n\rdata_asset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\ndata_asset\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.DataAssetB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x16UpdateDataAssetRequest\x12<\n\ndata_asset\x18\x01 \x01(\x0b\x32#.google.cloud.dataplex.v1.DataAssetB\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\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x80\x01\n\x16\x44\x65leteDataAssetRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/DataAsset\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"N\n\x13GetDataAssetRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/DataAsset\"\xb1\x01\n\x15ListDataAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataplex.googleapis.com/DataProduct\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"k\n\x16ListDataAssetsResponse\x12\x38\n\x0b\x64\x61ta_assets\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.DataAsset\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xee\x11\n\x12\x44\x61taProductService\x12\xf8\x01\n\x11\x43reateDataProduct\x12\x32.google.cloud.dataplex.v1.CreateDataProductRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0b\x44\x61taProduct\x12\x11OperationMetadata\xda\x41#parent,data_product,data_product_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/dataProducts:\x0c\x64\x61ta_product\x12\xd4\x01\n\x11\x44\x65leteDataProduct\x12\x32.google.cloud.dataplex.v1.DeleteDataProductRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/dataProducts/*}\x12\xa9\x01\n\x0eGetDataProduct\x12/.google.cloud.dataplex.v1.GetDataProductRequest\x1a%.google.cloud.dataplex.v1.DataProduct\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/dataProducts/*}\x12\xbc\x01\n\x10ListDataProducts\x12\x31.google.cloud.dataplex.v1.ListDataProductsRequest\x1a\x32.google.cloud.dataplex.v1.ListDataProductsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/dataProducts\x12\xfa\x01\n\x11UpdateDataProduct\x12\x32.google.cloud.dataplex.v1.UpdateDataProductRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41 \n\x0b\x44\x61taProduct\x12\x11OperationMetadata\xda\x41\x18\x64\x61ta_product,update_mask\x82\xd3\xe4\x93\x02M2=/v1/{data_product.name=projects/*/locations/*/dataProducts/*}:\x0c\x64\x61ta_product\x12\xf9\x01\n\x0f\x43reateDataAsset\x12\x30.google.cloud.dataplex.v1.CreateDataAssetRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41\x1e\n\tDataAsset\x12\x11OperationMetadata\xda\x41\x1fparent,data_asset,data_asset_id\x82\xd3\xe4\x93\x02K\"=/v1/{parent=projects/*/locations/*/dataProducts/*}/dataAssets:\ndata_asset\x12\xfb\x01\n\x0fUpdateDataAsset\x12\x30.google.cloud.dataplex.v1.UpdateDataAssetRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41\x1e\n\tDataAsset\x12\x11OperationMetadata\xda\x41\x16\x64\x61ta_asset,update_mask\x82\xd3\xe4\x93\x02V2H/v1/{data_asset.name=projects/*/locations/*/dataProducts/*/dataAssets/*}:\ndata_asset\x12\xdd\x01\n\x0f\x44\x65leteDataAsset\x12\x30.google.cloud.dataplex.v1.DeleteDataAssetRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/dataProducts/*/dataAssets/*}\x12\xb0\x01\n\x0cGetDataAsset\x12-.google.cloud.dataplex.v1.GetDataAssetRequest\x1a#.google.cloud.dataplex.v1.DataAsset\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/dataProducts/*/dataAssets/*}\x12\xc3\x01\n\x0eListDataAssets\x12/.google.cloud.dataplex.v1.ListDataAssetsRequest\x1a\x30.google.cloud.dataplex.v1.ListDataAssetsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/dataProducts/*}/dataAssets\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\x61taProductsProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + DataProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProduct").msgclass + DataProduct::Principal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProduct.Principal").msgclass + DataProduct::AccessGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProduct.AccessGroup").msgclass + DataAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAsset").msgclass + DataAsset::AccessGroupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAsset.AccessGroupConfig").msgclass + CreateDataProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataProductRequest").msgclass + DeleteDataProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataProductRequest").msgclass + GetDataProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataProductRequest").msgclass + ListDataProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataProductsRequest").msgclass + ListDataProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataProductsResponse").msgclass + UpdateDataProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataProductRequest").msgclass + CreateDataAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAssetRequest").msgclass + UpdateDataAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAssetRequest").msgclass + DeleteDataAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAssetRequest").msgclass + GetDataAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAssetRequest").msgclass + ListDataAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAssetsRequest").msgclass + ListDataAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAssetsResponse").msgclass + end + end + end +end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_services_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_services_pb.rb new file mode 100644 index 000000000000..9b09649bc9fe --- /dev/null +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/data_products.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.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_products_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataProductService + # `DataProductService` provides APIs for managing data products and + # the underlying data assets. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataProductService' + + # Creates a data product. + rpc :CreateDataProduct, ::Google::Cloud::Dataplex::V1::CreateDataProductRequest, ::Google::Longrunning::Operation + # Deletes a data product. The deletion will fail if the data product is not + # empty (i.e. contains at least one data asset). + rpc :DeleteDataProduct, ::Google::Cloud::Dataplex::V1::DeleteDataProductRequest, ::Google::Longrunning::Operation + # Gets a data product. + rpc :GetDataProduct, ::Google::Cloud::Dataplex::V1::GetDataProductRequest, ::Google::Cloud::Dataplex::V1::DataProduct + # Lists data products for a given project. + rpc :ListDataProducts, ::Google::Cloud::Dataplex::V1::ListDataProductsRequest, ::Google::Cloud::Dataplex::V1::ListDataProductsResponse + # Updates a data product. + rpc :UpdateDataProduct, ::Google::Cloud::Dataplex::V1::UpdateDataProductRequest, ::Google::Longrunning::Operation + # Creates a data asset. + rpc :CreateDataAsset, ::Google::Cloud::Dataplex::V1::CreateDataAssetRequest, ::Google::Longrunning::Operation + # Updates a data asset. + rpc :UpdateDataAsset, ::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest, ::Google::Longrunning::Operation + # Deletes a data asset. + rpc :DeleteDataAsset, ::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest, ::Google::Longrunning::Operation + # Gets a data asset. + rpc :GetDataAsset, ::Google::Cloud::Dataplex::V1::GetDataAssetRequest, ::Google::Cloud::Dataplex::V1::DataAsset + # Lists data assets for a given data product. + rpc :ListDataAssets, ::Google::Cloud::Dataplex::V1::ListDataAssetsRequest, ::Google::Cloud::Dataplex::V1::ListDataAssetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb index c0c5e7e2e83d..d1d5aea2dcd6 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb @@ -11,31 +11,8 @@ 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/datascans_common.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xd1\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\x12\'\n\x1a\x63\x61talog_publishing_enabled\x18\x08 \x01(\x08\x42\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\"\xd0\x0f\n\x11\x44\x61taProfileResult\x12\x16\n\trow_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12I\n\x07profile\x18\x04 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.DataProfileResult.ProfileB\x03\xe0\x41\x03\x12@\n\x0cscanned_data\x18\x05 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedDataB\x03\xe0\x41\x03\x12h\n\x18post_scan_actions_result\x18\x06 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultB\x03\xe0\x41\x03\x12\x61\n\x19\x63\x61talog_publishing_status\x18\x07 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanCatalogPublishingStatusB\x03\xe0\x41\x03\x1a\xc8\t\n\x07Profile\x12N\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x39.google.cloud.dataplex.v1.DataProfileResult.Profile.FieldB\x03\xe0\x41\x03\x1a\xec\x08\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04mode\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12[\n\x07profile\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfoB\x03\xe0\x41\x03\x1a\xcc\x07\n\x0bProfileInfo\x12\x17\n\nnull_ratio\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\x12\x1b\n\x0e\x64istinct_ratio\x18\x03 \x01(\x01\x42\x03\xe0\x41\x03\x12j\n\x0ctop_n_values\x18\x04 \x03(\x0b\x32O.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValueB\x03\xe0\x41\x03\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\x1a`\n\x0fStringFieldInfo\x12\x17\n\nmin_length\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\nmax_length\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0e\x61verage_length\x18\x03 \x01(\x01\x42\x03\xe0\x41\x03\x1a\x85\x01\n\x10IntegerFieldInfo\x12\x14\n\x07\x61verage\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03\x12\x1f\n\x12standard_deviation\x18\x03 \x01(\x01\x42\x03\xe0\x41\x03\x12\x10\n\x03min\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tquartiles\x18\x06 \x03(\x03\x42\x03\xe0\x41\x03\x12\x10\n\x03max\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x1a\x84\x01\n\x0f\x44oubleFieldInfo\x12\x14\n\x07\x61verage\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03\x12\x1f\n\x12standard_deviation\x18\x03 \x01(\x01\x42\x03\xe0\x41\x03\x12\x10\n\x03min\x18\x04 \x01(\x01\x42\x03\xe0\x41\x03\x12\x16\n\tquartiles\x18\x06 \x03(\x01\x42\x03\xe0\x41\x03\x12\x10\n\x03max\x18\x05 \x01(\x01\x42\x03\xe0\x41\x03\x1aG\n\tTopNValue\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05\x63ount\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x12\n\x05ratio\x18\x03 \x01(\x01\x42\x03\xe0\x41\x03\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"], - ["google.cloud.dataplex.v1.DataScanCatalogPublishingStatus", "google/cloud/dataplex/v1/datascans_common.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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud 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 28b72dd2a6f9..f7bf38c1768a 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 @@ -10,33 +10,10 @@ 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/datascans_common.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xe9\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\x12\'\n\x1a\x63\x61talog_publishing_enabled\x18\x08 \x01(\x08\x42\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\"\x85\n\n\x11\x44\x61taQualityResult\x12\x13\n\x06passed\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x17\n\x05score\x18\t \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12M\n\ndimensions\x18\x02 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResultB\x03\xe0\x41\x03\x12G\n\x07\x63olumns\x18\n \x03(\x0b\x32\x31.google.cloud.dataplex.v1.DataQualityColumnResultB\x03\xe0\x41\x03\x12\x43\n\x05rules\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.DataQualityRuleResultB\x03\xe0\x41\x03\x12\x16\n\trow_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12@\n\x0cscanned_data\x18\x07 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedDataB\x03\xe0\x41\x03\x12h\n\x18post_scan_actions_result\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultB\x03\xe0\x41\x03\x12\x61\n\x19\x63\x61talog_publishing_status\x18\x0b \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanCatalogPublishingStatusB\x03\xe0\x41\x03\x12|\n\"anomaly_detection_generated_assets\x18\x0c \x01(\x0b\x32K.google.cloud.dataplex.v1.DataQualityResult.AnomalyDetectionGeneratedAssetsB\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\x1a\xb5\x01\n\x1f\x41nomalyDetectionGeneratedAssets\x12\x19\n\x0cresult_table\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12$\n\x17\x64\x61ta_intermediate_table\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1c\x66reshness_intermediate_table\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19volume_intermediate_table\x18\x04 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\"\x98\x02\n\x15\x44\x61taQualityRuleResult\x12<\n\x04rule\x18\x01 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualityRuleB\x03\xe0\x41\x03\x12\x13\n\x06passed\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x65valuated_count\x18\t \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0cpassed_count\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\nnull_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\npass_ratio\x18\x06 \x01(\x01\x42\x03\xe0\x41\x03\x12\x1f\n\x12\x66\x61iling_rows_query\x18\n \x01(\tB\x03\xe0\x41\x03\x12 \n\x13\x61ssertion_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\"\x9c\x01\n\x1a\x44\x61taQualityDimensionResult\x12\x46\n\tdimension\x18\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.DataQualityDimensionB\x03\xe0\x41\x03\x12\x13\n\x06passed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\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\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\x8d\x0e\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\x12\x17\n\tsuspended\x18\xfa\x03 \x01(\x08\x42\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\"\xb5\x01\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\x12\x13\n\x06passed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12M\n\ndimensions\x18\x04 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResultB\x03\xe0\x41\x03\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/datascans_common.proto\x1a)google/cloud/dataplex/v1/processing.proto\"\xe9\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\x12\'\n\x1a\x63\x61talog_publishing_enabled\x18\x08 \x01(\x08\x42\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\"\x85\n\n\x11\x44\x61taQualityResult\x12\x13\n\x06passed\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x17\n\x05score\x18\t \x01(\x02\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12M\n\ndimensions\x18\x02 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResultB\x03\xe0\x41\x03\x12G\n\x07\x63olumns\x18\n \x03(\x0b\x32\x31.google.cloud.dataplex.v1.DataQualityColumnResultB\x03\xe0\x41\x03\x12\x43\n\x05rules\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.DataQualityRuleResultB\x03\xe0\x41\x03\x12\x16\n\trow_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12@\n\x0cscanned_data\x18\x07 \x01(\x0b\x32%.google.cloud.dataplex.v1.ScannedDataB\x03\xe0\x41\x03\x12h\n\x18post_scan_actions_result\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultB\x03\xe0\x41\x03\x12\x61\n\x19\x63\x61talog_publishing_status\x18\x0b \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanCatalogPublishingStatusB\x03\xe0\x41\x03\x12|\n\"anomaly_detection_generated_assets\x18\x0c \x01(\x0b\x32K.google.cloud.dataplex.v1.DataQualityResult.AnomalyDetectionGeneratedAssetsB\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\x1a\xb5\x01\n\x1f\x41nomalyDetectionGeneratedAssets\x12\x19\n\x0cresult_table\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12$\n\x17\x64\x61ta_intermediate_table\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12)\n\x1c\x66reshness_intermediate_table\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19volume_intermediate_table\x18\x04 \x01(\tB\x03\xe0\x41\x03\x42\x08\n\x06_score\"\xb3\x04\n\x15\x44\x61taQualityRuleResult\x12<\n\x04rule\x18\x01 \x01(\x0b\x32).google.cloud.dataplex.v1.DataQualityRuleB\x03\xe0\x41\x03\x12\x13\n\x06passed\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x65valuated_count\x18\t \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0cpassed_count\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\nnull_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\npass_ratio\x18\x06 \x01(\x01\x42\x03\xe0\x41\x03\x12\x1f\n\x12\x66\x61iling_rows_query\x18\n \x01(\tB\x03\xe0\x41\x03\x12 \n\x13\x61ssertion_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12k\n\x19\x64\x65\x62ug_queries_result_sets\x18\r \x03(\x0b\x32\x43.google.cloud.dataplex.v1.DataQualityRuleResult.DebugQueryResultSetB\x03\xe0\x41\x03\x1a=\n\x10\x44\x65\x62ugQueryResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x1am\n\x13\x44\x65\x62ugQueryResultSet\x12V\n\x07results\x18\x01 \x03(\x0b\x32@.google.cloud.dataplex.v1.DataQualityRuleResult.DebugQueryResultB\x03\xe0\x41\x03\"\x9c\x01\n\x1a\x44\x61taQualityDimensionResult\x12\x46\n\tdimension\x18\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.DataQualityDimensionB\x03\xe0\x41\x03\x12\x13\n\x06passed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\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\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xa4\x0f\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\x01\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\x12\x17\n\tsuspended\x18\xfa\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12Q\n\rdebug_queries\x18\xfe\x03 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityRule.DebugQueryB\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\x1a\x42\n\nDebugQuery\x12\x18\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rsql_statement\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x0b\n\trule_type\"\xb5\x01\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\x12\x13\n\x06passed\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x12M\n\ndimensions\x18\x04 \x03(\x0b\x32\x34.google.cloud.dataplex.v1.DataQualityDimensionResultB\x03\xe0\x41\x03\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"], - ["google.cloud.dataplex.v1.DataScanCatalogPublishingStatus", "google/cloud/dataplex/v1/datascans_common.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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud @@ -56,6 +33,8 @@ module V1 DataQualityResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State").enummodule DataQualityResult::AnomalyDetectionGeneratedAssets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.AnomalyDetectionGeneratedAssets").msgclass DataQualityRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRuleResult").msgclass + DataQualityRuleResult::DebugQueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRuleResult.DebugQueryResult").msgclass + DataQualityRuleResult::DebugQueryResultSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRuleResult.DebugQueryResultSet").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 @@ -69,6 +48,7 @@ module V1 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 + DataQualityRule::DebugQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.DebugQuery").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/data_taxonomy_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb index ea146b7579f7..b3ef13103a56 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb @@ -18,32 +18,8 @@ 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\"\xb3\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:v\x18\x01\xea\x41q\n$dataplex.googleapis.com/DataTaxonomy\x12Iprojects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}\"\x96\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:\x93\x01\x18\x01\xea\x41\x8d\x01\n%dataplex.googleapis.com/DataAttribute\x12\x64projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}\"\xc9\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:\x8f\x01\x18\x01\xea\x41\x89\x01\n,dataplex.googleapis.com/DataAttributeBinding\x12Yprojects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}B\x14\n\x12resource_reference\"\xd9\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:\x02\x18\x01\"\xb5\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:\x02\x18\x01\"X\n\x16GetDataTaxonomyRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$dataplex.googleapis.com/DataTaxonomy:\x02\x18\x01\"\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\"n\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:\x02\x18\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\xbb\x1d\n\x13\x44\x61taTaxonomyService\x12\x83\x02\n\x12\x43reateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.CreateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\x88\x02\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\x85\x02\n\x12UpdateDataTaxonomy\x12\x33.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\x88\x02\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\xdb\x01\n\x12\x44\x65leteDataTaxonomy\x12\x33.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest\x1a\x1d.google.longrunning.Operation\"q\x88\x02\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xc7\x01\n\x12ListDataTaxonomies\x12\x33.google.cloud.dataplex.v1.ListDataTaxonomiesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataTaxonomiesResponse\"F\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/dataTaxonomies\x12\xb1\x01\n\x0fGetDataTaxonomy\x12\x30.google.cloud.dataplex.v1.GetDataTaxonomyRequest\x1a&.google.cloud.dataplex.v1.DataTaxonomy\"D\x88\x02\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/dataTaxonomies/*}\x12\xbd\x02\n\x1a\x43reateDataAttributeBinding\x12;.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc2\x01\x88\x02\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\xbf\x02\n\x1aUpdateDataAttributeBinding\x12;.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\x88\x02\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\xf2\x01\n\x1a\x44\x65leteDataAttributeBinding\x12;.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest\x1a\x1d.google.longrunning.Operation\"x\x88\x02\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\xe3\x01\n\x19ListDataAttributeBindings\x12:.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest\x1a;.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse\"M\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*}/dataAttributeBindings\x12\xd0\x01\n\x17GetDataAttributeBinding\x12\x38.google.cloud.dataplex.v1.GetDataAttributeBindingRequest\x1a..google.cloud.dataplex.v1.DataAttributeBinding\"K\x88\x02\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/dataAttributeBindings/*}\x12\x96\x02\n\x13\x43reateDataAttribute\x12\x34.google.cloud.dataplex.v1.CreateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xa9\x01\x88\x02\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\x98\x02\n\x13UpdateDataAttribute\x12\x34.google.cloud.dataplex.v1.UpdateDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\x88\x02\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\xea\x01\n\x13\x44\x65leteDataAttribute\x12\x34.google.cloud.dataplex.v1.DeleteDataAttributeRequest\x1a\x1d.google.longrunning.Operation\"~\x88\x02\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x12\xd4\x01\n\x12ListDataAttributes\x12\x33.google.cloud.dataplex.v1.ListDataAttributesRequest\x1a\x34.google.cloud.dataplex.v1.ListDataAttributesResponse\"S\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes\x12\xc1\x01\n\x10GetDataAttribute\x12\x31.google.cloud.dataplex.v1.GetDataAttributeRequest\x1a\'.google.cloud.dataplex.v1.DataAttribute\"Q\x88\x02\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}\x1aN\x88\x02\x01\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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb index a39d4276ad86..5479f851d318 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb @@ -167,22 +167,6 @@ def self.configure 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? @@ -2994,612 +2978,6 @@ def cancel_job request, options = nil 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, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, 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, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, 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, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, 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, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, 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, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - 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, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - ## # Configuration class for the DataplexService API. # @@ -3918,36 +3296,6 @@ class Rpcs # @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 @@ -4005,18 +3353,6 @@ def initialize parent_rpcs = nil @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 diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb index f7a25a668f6b..adf0fdff4816 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb @@ -47,27 +47,6 @@ def asset_path project:, location:, lake:, zone:, asset: "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. # diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb index a8f9ec2db7ca..a5eedf25b957 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb @@ -169,22 +169,6 @@ def self.configure 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? @@ -2800,570 +2784,6 @@ def cancel_job request, options = nil 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, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, 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, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, 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, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, 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, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, 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, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - 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, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Dataplex::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - 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? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - ## # Configuration class for the DataplexService REST API. # @@ -3652,36 +3072,6 @@ class Rpcs # @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 @@ -3739,18 +3129,6 @@ def initialize parent_rpcs = nil @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 diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb index 87afffd5ae92..e7a9a19aa241 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb @@ -1153,246 +1153,6 @@ def cancel_job request_pb, options = nil end 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, - method_name: "create_environment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - 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, - method_name: "update_environment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - 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, - method_name: "delete_environment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - 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, - method_name: "list_environments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEnvironmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - 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, - method_name: "get_environment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Environment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - 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, - method_name: "list_sessions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListSessionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - ## # @private # @@ -1969,134 +1729,6 @@ def self.transcode_cancel_job_request request_pb ) 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 diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb index d9af47659c98..4fddfe4d3194 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb @@ -7,31 +7,10 @@ require 'google/api/field_behavior_pb' -descriptor_data = "\n/google/cloud/dataplex/v1/datascans_common.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xb1\x01\n\x1f\x44\x61taScanCatalogPublishingStatus\x12S\n\x05state\x18\x01 \x01(\x0e\x32?.google.cloud.dataplex.v1.DataScanCatalogPublishingStatus.StateB\x03\xe0\x41\x03\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42p\n\x1c\x63om.google.cloud.dataplex.v1B\x14\x44\x61taScansCommonProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" +descriptor_data = "\n/google/cloud/dataplex/v1/datascans_common.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xbe\x01\n\x1f\x44\x61taScanCatalogPublishingStatus\x12S\n\x05state\x18\x01 \x01(\x0e\x32?.google.cloud.dataplex.v1.DataScanCatalogPublishingStatus.StateB\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\x42p\n\x1c\x63om.google.cloud.dataplex.v1B\x14\x44\x61taScansCommonProtoP\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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb index 9562286953a4..c9f845f1de96 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb @@ -24,36 +24,8 @@ 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\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/dataplex/v1/data_discovery.proto\x1a\x31google/cloud/dataplex/v1/data_documentation.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\x01\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"c\n\x15\x44\x65leteDataScanRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n dataplex.googleapis.com/DataScan\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\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\"\xdb\r\n\x08\x44\x61taScan\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x18\n\x03uid\x18\x02 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12J\n\x13\x64\x61ta_discovery_spec\x18\x66 \x01(\x0b\x32+.google.cloud.dataplex.v1.DataDiscoverySpecH\x00\x12R\n\x17\x64\x61ta_documentation_spec\x18g \x01(\x0b\x32/.google.cloud.dataplex.v1.DataDocumentationSpecH\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\x12T\n\x15\x64\x61ta_discovery_result\x18\xca\x01 \x01(\x0b\x32-.google.cloud.dataplex.v1.DataDiscoveryResultB\x03\xe0\x41\x03H\x01\x12\\\n\x19\x64\x61ta_documentation_result\x18\xcb\x01 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.DataDocumentationResultB\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\xd0\x01\n\x0f\x45xecutionStatus\x12>\n\x15latest_job_start_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12<\n\x13latest_job_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12?\n\x16latest_job_create_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\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: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"], - ["google.cloud.dataplex.v1.DataDiscoverySpec", "google/cloud/dataplex/v1/data_discovery.proto"], - ["google.cloud.dataplex.v1.DataDocumentationSpec", "google/cloud/dataplex/v1/data_documentation.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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud 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 e2eea5ad7407..cc016a4c438b 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 @@ -11,34 +11,10 @@ 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/google/cloud/dataplex/v1/datascans_common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9d\x0c\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\x13\n\x0b\x64\x61tascan_id\x18\x06 \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\x12\x46\n\x05table\x18\x18 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.DiscoveryEvent.TableDetailsH\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_\n\x0cTableDetails\x12\r\n\x05table\x18\x01 \x01(\t\x12@\n\x04type\x18\x02 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.DiscoveryEvent.TableType\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,\n\rActionDetails\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05issue\x18\x02 \x01(\t\"\x82\x02\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\x12\x13\n\x0fTABLE_PUBLISHED\x10\n\x12\x11\n\rTABLE_UPDATED\x10\x0b\x12\x11\n\rTABLE_IGNORED\x10\x0c\x12\x11\n\rTABLE_DELETED\x10\r\"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\"`\n\tTableType\x12\x1a\n\x16TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45XTERNAL_TABLE\x10\x01\x12\x11\n\rBIGLAKE_TABLE\x10\x02\x12\x10\n\x0cOBJECT_TABLE\x10\x03\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\"\xe5\x13\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\x12\\\n\x19\x63\x61talog_publishing_status\x18\r \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanCatalogPublishingStatus\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\"]\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\x12\x12\n\x0e\x44\x41TA_DISCOVERY\x10\x04\"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\"\x9a\x03\n\x15\x42usinessGlossaryEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12M\n\nevent_type\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.BusinessGlossaryEvent.EventType\x12\x10\n\x08resource\x18\x03 \x01(\t\"\x8e\x02\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fGLOSSARY_CREATE\x10\x01\x12\x13\n\x0fGLOSSARY_UPDATE\x10\x02\x12\x13\n\x0fGLOSSARY_DELETE\x10\x03\x12\x1c\n\x18GLOSSARY_CATEGORY_CREATE\x10\x04\x12\x1c\n\x18GLOSSARY_CATEGORY_UPDATE\x10\x05\x12\x1c\n\x18GLOSSARY_CATEGORY_DELETE\x10\x06\x12\x18\n\x14GLOSSARY_TERM_CREATE\x10\x07\x12\x18\n\x14GLOSSARY_TERM_UPDATE\x10\x08\x12\x18\n\x14GLOSSARY_TERM_DELETE\x10\t\"\xd2\x01\n\x0e\x45ntryLinkEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x46\n\nevent_type\x18\x02 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.EntryLinkEvent.EventType\x12\x10\n\x08resource\x18\x03 \x01(\t\"U\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x45NTRY_LINK_CREATE\x10\x01\x12\x15\n\x11\x45NTRY_LINK_DELETE\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/google/cloud/dataplex/v1/datascans_common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9d\x0c\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\x13\n\x0b\x64\x61tascan_id\x18\x06 \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\x12\x46\n\x05table\x18\x18 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.DiscoveryEvent.TableDetailsH\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_\n\x0cTableDetails\x12\r\n\x05table\x18\x01 \x01(\t\x12@\n\x04type\x18\x02 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.DiscoveryEvent.TableType\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,\n\rActionDetails\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05issue\x18\x02 \x01(\t\"\x82\x02\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\x12\x13\n\x0fTABLE_PUBLISHED\x10\n\x12\x11\n\rTABLE_UPDATED\x10\x0b\x12\x11\n\rTABLE_IGNORED\x10\x0c\x12\x11\n\rTABLE_DELETED\x10\r\"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\"`\n\tTableType\x12\x1a\n\x16TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x45XTERNAL_TABLE\x10\x01\x12\x11\n\rBIGLAKE_TABLE\x10\x02\x12\x10\n\x0cOBJECT_TABLE\x10\x03\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\x13\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\x12\\\n\x19\x63\x61talog_publishing_status\x18\r \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataScanCatalogPublishingStatus\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\"]\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\x12\x12\n\x0e\x44\x41TA_DISCOVERY\x10\x04\"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\"M\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\x0c\n\x08SCHEDULE\x10\x02\x12\x0c\n\x08ONE_TIME\x10\x03\"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\"\x9a\x03\n\x15\x42usinessGlossaryEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12M\n\nevent_type\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.BusinessGlossaryEvent.EventType\x12\x10\n\x08resource\x18\x03 \x01(\t\"\x8e\x02\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fGLOSSARY_CREATE\x10\x01\x12\x13\n\x0fGLOSSARY_UPDATE\x10\x02\x12\x13\n\x0fGLOSSARY_DELETE\x10\x03\x12\x1c\n\x18GLOSSARY_CATEGORY_CREATE\x10\x04\x12\x1c\n\x18GLOSSARY_CATEGORY_UPDATE\x10\x05\x12\x1c\n\x18GLOSSARY_CATEGORY_DELETE\x10\x06\x12\x18\n\x14GLOSSARY_TERM_CREATE\x10\x07\x12\x18\n\x14GLOSSARY_TERM_UPDATE\x10\x08\x12\x18\n\x14GLOSSARY_TERM_DELETE\x10\t\"\xd2\x01\n\x0e\x45ntryLinkEvent\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x46\n\nevent_type\x18\x02 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.EntryLinkEvent.EventType\x12\x10\n\x08resource\x18\x03 \x01(\t\"U\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x45NTRY_LINK_CREATE\x10\x01\x12\x15\n\x11\x45NTRY_LINK_DELETE\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"], - ["google.cloud.dataplex.v1.DataScanCatalogPublishingStatus", "google/cloud/dataplex/v1/datascans_common.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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb index 9f92bf741053..489cd0102535 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb @@ -14,30 +14,8 @@ 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\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\"\xbe\x01\n\x0bScannedData\x12S\n\x11incremental_field\x18\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.ScannedData.IncrementalFieldH\x00\x1aL\n\x10IncrementalField\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05start\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x65nd\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x0c\n\ndata_rangeBk\n\x1c\x63om.google.cloud.dataplex.v1B\x0fProcessingProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" +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\x1a\x1egoogle/protobuf/duration.proto\"\xca\x02\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\x12=\n\x08one_time\x18\x66 \x01(\x0b\x32).google.cloud.dataplex.v1.Trigger.OneTimeH\x00\x1a\n\n\x08OnDemand\x1a\x1d\n\x08Schedule\x12\x11\n\x04\x63ron\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1aL\n\x07OneTime\x12\x41\n\x19ttl_after_scan_completion\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\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\"\xbe\x01\n\x0bScannedData\x12S\n\x11incremental_field\x18\x01 \x01(\x0b\x32\x36.google.cloud.dataplex.v1.ScannedData.IncrementalFieldH\x00\x1aL\n\x10IncrementalField\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05start\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x65nd\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud @@ -41,6 +21,7 @@ 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 + Trigger::OneTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.OneTime").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 diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb index 9588f77a6f82..374c09e4b98a 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb @@ -12,31 +12,8 @@ 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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb index faf1e3bc679d..4fec9b7366f7 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb @@ -20,7 +20,7 @@ require "google/cloud/dataplex/v1/business_glossary_service/rest" require "google/cloud/dataplex/v1/catalog_service/rest" require "google/cloud/dataplex/v1/cmek_service/rest" -require "google/cloud/dataplex/v1/content_service/rest" +require "google/cloud/dataplex/v1/data_product_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" diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb index 0afab5d5d3ac..09bb0b83ffd6 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb @@ -9,29 +9,8 @@ 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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb index f7926ab78db0..89e84dcb80b8 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb @@ -8,7 +8,6 @@ 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' @@ -17,36 +16,10 @@ 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" +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/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/Job2\x8a(\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*\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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud @@ -87,14 +60,6 @@ module V1 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 diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb index ff8fc57661d4..4d07cb5ee69a 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb @@ -94,19 +94,6 @@ class Service 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 diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb index 81b3556fdcdd..1530fc4bfcbe 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb @@ -13,31 +13,8 @@ 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 +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) module Google module Cloud diff --git a/google-cloud-dataplex-v1/proto_docs/google/api/client.rb b/google-cloud-dataplex-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..e62ceba4577a 100644 --- a/google-cloud-dataplex-v1/proto_docs/google/api/client.rb +++ b/google-cloud-dataplex-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!attribute [rw] selective_gapic_generation # @return [::Google::Api::SelectiveGapicGeneration] # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. class CommonLanguageSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -141,9 +143,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # 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 @@ -155,11 +158,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +193,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +335,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +363,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +375,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +391,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -411,6 +443,8 @@ class LongRunning # This message is used to configure the generation of a subset of the RPCs in # a service for client libraries. + # + # Note: This feature should not be used in most cases. # @!attribute [rw] methods # @return [::Array<::String>] # An allowlist of the fully qualified names of RPCs that should be included @@ -428,6 +462,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +574,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end 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 1c9f3446667b..1585a4d585e7 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 @@ -1064,6 +1064,45 @@ class LookupEntryRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Lookup Context using permissions in the source system. + # @!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] resources + # @return [::Array<::String>] + # Required. The entry names to lookup context for. The request should have + # max 10 of those. + # + # ## Examples: + # + # projects/\\{project}/locations/\\{location}/entryGroups/\\{entry_group}/entries/\\{entry} + # @!attribute [rw] options + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Allows to configure the context. + class LookupContextRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class OptionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Lookup Context response. + # @!attribute [rw] context + # @return [::String] + # LLM generated context for the resources. + class LookupContextResponse + 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 @@ -1769,10 +1808,16 @@ module Type # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The time when the Entry Link was last updated. + # @!attribute [rw] aspects + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::Aspect}] + # Optional. The aspects that are attached to the entry link. + # The format of the aspect key has to be the following: + # `{project_id_or_number}.{location_id}.{aspect_type_id}` + # Currently, only a single aspect of a Dataplex-owned Aspect Type is allowed. # @!attribute [rw] entry_references # @return [::Array<::Google::Cloud::Dataplex::V1::EntryLink::EntryReference>] - # Required. Specifies the Entries referenced in the Entry Link. There should - # be exactly two entry references. + # Required. Immutable. Specifies the Entries referenced in the Entry Link. + # There should be exactly two entry references. class EntryLink include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1808,6 +1853,15 @@ module Type TARGET = 3 end end + + # @!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 # Request message for CreateEntryLink. @@ -1831,6 +1885,27 @@ class CreateEntryLinkRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for UpdateEntryLink method. + # @!attribute [rw] entry_link + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # Required. Entry Link resource. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true and the entry link doesn't exist, the service will + # create it. + # @!attribute [rw] aspect_keys + # @return [::Array<::String>] + # Optional. The map keys of the Aspects which the service should modify. + # It should be the aspect type reference in the format + # `{project_id_or_number}.{location_id}.{aspect_type_id}`. + # + # If this field is left empty, the service treats it as specifying + # exactly those Aspects present in the request. + class UpdateEntryLinkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request message for DeleteEntryLink. # @!attribute [rw] name # @return [::String] @@ -1841,6 +1916,66 @@ class DeleteEntryLinkRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for LookupEntryLinks. + # @!attribute [rw] name + # @return [::String] + # Required. The project to which the request should be attributed to + # Format: `projects/{project_id_or_number}/locations/{location_id}`. + # @!attribute [rw] entry + # @return [::String] + # Required. The resource name of the referred Entry. + # Format: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. + # Entry Links which references this entry will be returned in the response. + # @!attribute [rw] entry_mode + # @return [::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest::EntryMode] + # Mode of entry reference. + # @!attribute [rw] entry_link_types + # @return [::Array<::String>] + # Entry link types to filter the response by. If empty, all entry link types + # will be returned. At most 10 entry link types can be specified. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of EntryLinks to return. The service may return fewer + # than this value. If unspecified, at most 10 EntryLinks will be returned. + # The maximum value is 10; values above 10 will be coerced to 10. + # @!attribute [rw] page_token + # @return [::String] + # Page token received from a previous `LookupEntryLinks` call. Provide this + # to retrieve the subsequent page. When paginating, all other parameters that + # are provided to the `LookupEntryLinks` request must match the call that + # provided the page token. + class LookupEntryLinksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mode of entry reference. + module EntryMode + # Unspecified entry mode. Returns both directional and non-directional + # entry links which references the entry. + ENTRY_MODE_UNSPECIFIED = 0 + + # Returns all directed entry links which references the entry as source. + SOURCE = 1 + + # Return all directed entry links which references the entry as target. + TARGET = 2 + end + end + + # Response message for LookupEntryLinks. + # @!attribute [rw] entry_links + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryLink>] + # List of entry links that reference the specified entry. + # @!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 LookupEntryLinksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request message for GetEntryLink. # @!attribute [rw] name # @return [::String] @@ -1851,6 +1986,230 @@ class GetEntryLinkRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # MetadataFeed contains information related to the metadata feed. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the metadata feed, in the format + # `projects/{project_id_or_number}/locations/{location_id}/metadataFeeds/{metadata_feed_id}`. + # @!attribute [r] uid + # @return [::String] + # Output only. A system-generated, globally unique ID for the metadata job. + # If the metadata job is deleted and then re-created with the same name, this + # ID is different. + # @!attribute [rw] scope + # @return [::Google::Cloud::Dataplex::V1::MetadataFeed::Scope] + # Required. The scope of the metadata feed. + # Only the in scope changes are published. + # @!attribute [rw] filters + # @return [::Google::Cloud::Dataplex::V1::MetadataFeed::Filters] + # Optional. The filters of the metadata feed. + # Only the changes that match the filters are published. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the feed was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the feed was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels. + # @!attribute [rw] pubsub_topic + # @return [::String] + # Optional. The pubsub topic that you want the metadata feed messages to + # publish to. Please grant Dataplex service account the permission to + # publish messages to the topic. The service account is: + # service-\\{PROJECT_NUMBER}@gcp-sa-dataplex.iam.gserviceaccount.com. + class MetadataFeed + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Scope defines the scope of the metadata feed. + # Scopes are exclusive. Only one of the scopes can be specified. + # @!attribute [rw] organization_level + # @return [::Boolean] + # Optional. Whether the metadata feed is at the organization-level. + # + # - If `true`, all changes happened to the entries in the same + # organization as the feed are published. + # - If `false`, you must specify a list of projects or a list of entry + # groups whose entries you want to listen to. + # + # The default is `false`. + # @!attribute [rw] projects + # @return [::Array<::String>] + # Optional. The projects whose entries you want to listen to. + # Must be in the same organization as the feed. + # Must be in the format: `projects/{project_id_or_number}`. + # @!attribute [rw] entry_groups + # @return [::Array<::String>] + # Optional. The entry groups whose entries you want to listen to. + # Must be in the format: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + class Scope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Filters defines the type of changes that you want to listen to. + # You can have multiple entry type filters and multiple aspect type filters. + # All of the entry type filters are OR'ed together. + # All of the aspect type filters are OR'ed together. + # All of the entry type filters and aspect type filters are AND'ed together. + # @!attribute [rw] entry_types + # @return [::Array<::String>] + # Optional. The entry types that you want to listen to, specified as + # relative resource names in the format + # `projects/{project_id_or_number}/locations/{location}/entryTypes/{entry_type_id}`. + # Only entries that belong to the specified entry types are published. + # @!attribute [rw] aspect_types + # @return [::Array<::String>] + # Optional. The aspect types that you want to listen to. Depending on how + # the aspect is attached to the entry, in the format: + # `projects/{project_id_or_number}/locations/{location}/aspectTypes/{aspect_type_id}`. + # @!attribute [rw] change_types + # @return [::Array<::Google::Cloud::Dataplex::V1::MetadataFeed::Filters::ChangeType>] + # Optional. The type of change that you want to listen to. + # If not specified, all changes are published. + class Filters + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of change that you want to listen to. + module ChangeType + # Unspecified change type. Defaults to UNSPECIFIED. + CHANGE_TYPE_UNSPECIFIED = 0 + + # The change is a create event. + CREATE = 1 + + # The change is an update event. + UPDATE = 2 + + # The change is a delete event. + DELETE = 3 + 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 + + # Request message for CreateMetadataFeed. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent location, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @!attribute [rw] metadata_feed + # @return [::Google::Cloud::Dataplex::V1::MetadataFeed] + # Required. The metadata job resource. + # @!attribute [rw] metadata_feed_id + # @return [::String] + # Optional. The metadata job ID. If not provided, a unique ID is generated + # with the prefix `metadata-job-`. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. The service validates the request without performing any + # mutations. The default is false. + class CreateMetadataFeedRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetMetadataFeed. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the metadata feed, in the format + # `projects/{project_id_or_number}/locations/{location_id}/MetadataFeeds/{metadata_feed_id}`. + class GetMetadataFeedRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListMetadataFeedsRequest. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent location, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of metadata feeds to return. The service + # might return fewer feeds than this value. If unspecified, at most 10 feeds + # are returned. The maximum value is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token received from a previous `ListMetadataFeeds` call. + # Provide this token to retrieve the subsequent page of results. When + # paginating, all other parameters that are provided to the + # `ListMetadataFeeds` request must match the call that provided the + # page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. Filters are case-sensitive. + # The service supports the following formats: + # + # * `labels.key1 = "value1"` + # * `labels:key1` + # * `name = "value"` + # + # You can combine filters with `AND`, `OR`, and `NOT` operators. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The field to sort the results by, either `name` or `create_time`. + # If not specified, the ordering is undefined. + class ListMetadataFeedsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListMetadataFeeds. + # @!attribute [rw] metadata_feeds + # @return [::Array<::Google::Cloud::Dataplex::V1::MetadataFeed>] + # List of metadata feeds under the specified parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. If there are no more results + # in the list, the value is empty. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that the service couldn't reach. + class ListMetadataFeedsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteMetadataFeed. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the metadata feed, in the format + # `projects/{project_id_or_number}/locations/{location_id}/MetadataFeeds/{metadata_feed_id}`. + class DeleteMetadataFeedRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateMetadataFeed. + # @!attribute [rw] metadata_feed + # @return [::Google::Cloud::Dataplex::V1::MetadataFeed] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. 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 UpdateMetadataFeedRequest + 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. @@ -1867,6 +2226,8 @@ module EntryView # aspects exceeds 100, the first 100 will be returned. CUSTOM = 3 + # Returns all aspects. If the number of aspects exceeds 100, the first + # 100 will be returned. ALL = 4 end diff --git a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb deleted file mode 100644 index dad1fdc21791..000000000000 --- a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# 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/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb index d17ce8be02b3..449c9ce7263d 100644 --- a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb +++ b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb @@ -22,9 +22,35 @@ module Cloud module Dataplex module V1 # DataDocumentation scan related spec. + # @!attribute [rw] catalog_publishing_enabled + # @return [::Boolean] + # Optional. Whether to publish result to Dataplex Catalog. + # @!attribute [rw] generation_scopes + # @return [::Array<::Google::Cloud::Dataplex::V1::DataDocumentationSpec::GenerationScope>] + # Optional. Specifies which components of the data documentation to generate. + # Any component that is required to generate the specified components will + # also be generated. If no generation scope is specified, all available + # documentation components will be generated. class DataDocumentationSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # The data documentation generation scope. This field contains the possible + # components of a data documentation scan which can be selectively generated. + module GenerationScope + # Unspecified generation scope. If no generation scope is specified, all + # available documentation components will be generated. + GENERATION_SCOPE_UNSPECIFIED = 0 + + # All the possible results will be generated. + ALL = 1 + + # Table and column descriptions will be generated. + TABLE_AND_COLUMN_DESCRIPTIONS = 2 + + # SQL queries will be generated. + SQL_QUERIES = 3 + end end # The output of a DataDocumentation scan. diff --git a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_products.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_products.rb new file mode 100644 index 000000000000..af6bd4291ba9 --- /dev/null +++ b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_products.rb @@ -0,0 +1,520 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 data product is a curated collection of data assets, packaged to address + # specific use cases. It's a way to manage and share data in a more organized, + # product-like manner. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the data product. + # Format: + # `projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}`. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated unique ID for the data product. + # This ID will be different if the data product is deleted and re-created + # with the same name. + # @!attribute [rw] display_name + # @return [::String] + # Required. User-friendly display name of the data product. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data product was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data product was last updated. + # @!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] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the data product. + # + # Example: + # ``` + # { + # "environment": "production", + # "billing": "marketing-department" + # } + # ``` + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the data product. + # @!attribute [rw] icon + # @return [::String] + # Optional. Base64 encoded image representing the data product. Max + # Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API + # only performs validation on size of the encoded data. Note: For byte + # fields, the content of the fields are base64-encoded (which increases the + # size of the data by 33-36%) when using JSON on the wire. + # @!attribute [rw] owner_emails + # @return [::Array<::String>] + # Required. Emails of the data product owners. + # @!attribute [r] asset_count + # @return [::Integer] + # Output only. Number of data assets associated with this data product. + # @!attribute [rw] access_groups + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::DataProduct::AccessGroup}] + # Optional. Data product access groups by access group id as key. + # If data product is used only for packaging data assets, then access groups + # may be empty. However, if a data product is used for sharing data assets, + # then at least one access group must be specified. + # + # Example: + # ``` + # { + # "analyst": { + # "id": "analyst", + # "displayName": "Analyst", + # "description": "Access group for analysts", + # "principal": { + # "googleGroup": "analysts@example.com" + # } + # } + # } + # ``` + class DataProduct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the principal entity associated with an access group, as per + # https://cloud.google.com/iam/docs/principals-overview. + # @!attribute [rw] google_group + # @return [::String] + # Optional. Email of the Google Group, as per + # https://cloud.google.com/iam/docs/principals-overview#google-group. + class Principal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom user defined access groups at the data product level. These are used + # for granting different levels of access (IAM roles) on the individual data + # product's data assets. + # @!attribute [rw] id + # @return [::String] + # Required. Unique identifier of the access group within the data product. + # User defined. Eg. "analyst", "developer", etc. + # @!attribute [rw] display_name + # @return [::String] + # Required. User friendly display name of the access group. + # Eg. "Analyst", "Developer", etc. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the access group. + # @!attribute [rw] principal + # @return [::Google::Cloud::Dataplex::V1::DataProduct::Principal] + # Required. The principal entity associated with this access group. + class AccessGroup + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Dataplex::V1::DataProduct::AccessGroup] + class AccessGroupsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents a data asset resource that can be packaged and shared via a data + # product. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the data asset. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}/dataAssets/\\{data_asset_id} + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the data asset. + # This ID will be different if the data asset is deleted and re-created + # with the same name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data asset was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data asset was last updated. + # @!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] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the data asset. + # + # Example: + # ``` + # { + # "environment": "production", + # "billing": "marketing-department" + # } + # ``` + # @!attribute [rw] resource + # @return [::String] + # Required. Immutable. Full resource name of the cloud resource represented + # by the data asset. This must follow + # https://cloud.google.com/iam/docs/full-resource-names. Example: + # `//bigquery.googleapis.com/projects/my_project_123/datasets/dataset_456/tables/table_789` + # Only BigQuery tables and datasets are currently supported. + # Data asset creator must have getIamPolicy and setIamPolicy permissions on + # the resource. Data asset creator must also have resource specific get + # permission, for instance, bigquery.tables.get for BigQuery tables. + # @!attribute [rw] access_group_configs + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::DataAsset::AccessGroupConfig}] + # Optional. Access groups configurations for this data asset. + # + # The key is `DataProduct.AccessGroup.id` and the value is + # `AccessGroupConfig`. + # + # Example: + # ``` + # { + # "analyst": { + # "iamRoles": ["roles/bigquery.dataViewer"] + # } + # } + # ``` + # + # Currently, at most one IAM role is allowed per access group. For providing + # multiple predefined IAM roles, wrap them in a custom IAM role as per + # https://cloud.google.com/iam/docs/creating-custom-roles. + class DataAsset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for access group inherited from the parent data product. + # @!attribute [rw] iam_roles + # @return [::Array<::String>] + # Optional. IAM roles granted on the resource to this access group. Role + # name follows https://cloud.google.com/iam/docs/reference/rest/v1/roles. + # + # Example: `[ "roles/bigquery.dataViewer" ]` + class AccessGroupConfig + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Dataplex::V1::DataAsset::AccessGroupConfig] + class AccessGroupConfigsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for creating a data product. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data product will be created. + # Format: projects/\\{project_id_or_number}/locations/\\{location_id} + # @!attribute [rw] data_product_id + # @return [::String] + # Optional. The ID of the data product to create. + # + # The ID must conform to RFC-1034 and contain only lower-case letters (a-z), + # numbers (0-9), or hyphens, with the first character a letter, the last a + # letter or a number, and a 63 character maximum. Characters outside of + # ASCII are not permitted. + # Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$` + # If not provided, a system generated ID will be used. + # @!attribute [rw] data_product + # @return [::Google::Cloud::Dataplex::V1::DataProduct] + # Required. The data product to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Validates the request without actually creating the data product. + # Default: false. + class CreateDataProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a data product. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data product to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the data product. + # + # If an etag is provided and does not match the current etag of the data + # product, then the deletion will be blocked and an ABORTED error will be + # returned. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Validates the request without actually deleting the data product. + # Default: false. + class DeleteDataProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a data product. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data product to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} + class GetDataProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing data products. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which has this collection of data products. + # + # Format: `projects/{project_id_or_number}/locations/{location_id}`. + # + # Supports listing across all locations with the wildcard `-` (hyphen) + # character. Example: `projects/{project_id_or_number}/locations/-` + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression that filters data products listed in the + # response. + # + # Example of using this filter is: `display_name="my-data-product"` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of data products to return. The service may + # return fewer than this value. If unspecified, at most 50 data products will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataProducts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataProducts` must + # match the call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by expression that orders data products listed in the + # response. + # + # Supported Order by fields are: `name` or `create_time`. + # + # If not specified, the ordering is undefined. + # + # Ordering by `create_time` is not supported when listing resources across + # locations (i.e. when request contains `/locations/-`). + class ListDataProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing data products. + # @!attribute [rw] data_products + # @return [::Array<::Google::Cloud::Dataplex::V1::DataProduct>] + # The data products for the requested filter criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is empty, then there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that the service couldn't reach. + class ListDataProductsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a data product. + # @!attribute [rw] data_product + # @return [::Google::Cloud::Dataplex::V1::DataProduct] + # Required. The data product to update. + # The data product's `name` field is used to identify the data product to + # update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + # If this is empty or not set, then all the fields will be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Validates the request without actually updating the data product. + # Default: false. + class UpdateDataProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a data asset. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data asset will be created. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} + # @!attribute [rw] data_asset_id + # @return [::String] + # Optional. The ID of the data asset to create. + # + # The ID must conform to RFC-1034 and contain only lower-case letters (a-z), + # numbers (0-9), or hyphens, with the first character a letter, the last a + # letter or a number, and a 63 character maximum. Characters outside of + # ASCII are not permitted. + # Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$` + # If not provided, a system generated ID will be used. + # @!attribute [rw] data_asset + # @return [::Google::Cloud::Dataplex::V1::DataAsset] + # Required. The data asset to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Validates the request without actually creating the data asset. + # Defaults to false. + class CreateDataAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a data asset. + # @!attribute [rw] data_asset + # @return [::Google::Cloud::Dataplex::V1::DataAsset] + # Required. The data asset to update. + # The data asset's `name` field is used to identify the data asset to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + # If this is empty or not set, then all the fields will be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Validates the request without actually updating the data asset. + # Defaults to false. + class UpdateDataAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a data asset. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data asset to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}/dataAssets/\\{data_asset_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the data asset. + # If this is provided, it must match the server's etag. + # If the etag is provided and does not match the server-computed etag, + # the request must fail with a ABORTED error code. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Validates the request without actually deleting the data asset. + # Defaults to false. + class DeleteDataAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a data asset. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the data asset to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id}/dataAssets/\\{data_asset_id} + class GetDataAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing data assets. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which has this collection of data assets. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/dataProducts/\\{data_product_id} + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression that filters data assets listed in the + # response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by expression that orders data assets listed in the + # response. + # + # Supported `order_by` fields are: `name` or `create_time`. + # + # If not specified, the ordering is undefined. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of data assets to return. The service may + # return fewer than this value. If unspecified, at most 50 data assets will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataAssets` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataAssets` must + # match the call that provided the page token. + class ListDataAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing data assets. + # @!attribute [rw] data_assets + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAsset>] + # The data assets for the requested filter criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is empty, then there are no subsequent pages. + class ListDataAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end 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 dd4dfaea025b..4d994b6dec39 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 @@ -293,9 +293,41 @@ class AnomalyDetectionGeneratedAssets # assertion rule. # # This field is only valid for SQL assertion rules. + # @!attribute [r] debug_queries_result_sets + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRuleResult::DebugQueryResultSet>] + # Output only. Contains the results of all debug queries for this rule. + # The number of result sets will correspond to the number of + # {::Google::Cloud::Dataplex::V1::DataQualityRule#debug_queries debug_queries}. class DataQualityRuleResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains a single result from the debug query. + # @!attribute [rw] name + # @return [::String] + # Specifies the name of the result. Available if provided with an explicit + # alias using `[AS] alias`. + # @!attribute [rw] type + # @return [::String] + # Indicates the data type of the result. For more information, see + # [BigQuery data + # types](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types). + # @!attribute [rw] value + # @return [::String] + # Represents the value of the result as a string. + class DebugQueryResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains all results from a debug query. + # @!attribute [r] results + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRuleResult::DebugQueryResult>] + # Output only. Contains all results. Up to 10 results can be returned. + class DebugQueryResultSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # DataQualityDimensionResult provides a more detailed, per-dimension view of @@ -399,7 +431,7 @@ class DataQualityDimension # * UniquenessExpectation # @!attribute [rw] dimension # @return [::String] - # Required. The dimension a rule belongs to. Results are also aggregated at + # Optional. The dimension a rule belongs to. Results are also aggregated at # the dimension level. Custom dimension name is supported with all uppercase # letters and maximum length of 30 characters. # @!attribute [rw] threshold @@ -428,6 +460,11 @@ class DataQualityDimension # @return [::Boolean] # Optional. Whether the Rule is active or suspended. # Default is false. + # @!attribute [rw] debug_queries + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule::DebugQuery>] + # Optional. Specifies the debug queries for this rule. + # Currently, only one query is supported, but this may be expanded in the + # future. class DataQualityRule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -590,6 +627,39 @@ class SqlAssertion include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Specifies a SQL statement that is evaluated to return up to 10 scalar + # values that are used to debug rules. If the rule fails, the values can help + # diagnose the cause of the failure. + # + # The SQL statement must use [GoogleSQL + # syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax), + # and must not contain any semicolons. + # + # You can use the data reference parameter `${data()}` to reference the + # source table with all of its precondition filters applied. Examples of + # precondition filters include row filters, incremental data filters, and + # sampling. For more information, see [Data reference + # parameter](https://cloud.google.com/dataplex/docs/auto-data-quality-overview#data-reference-parameter). + # + # You can also name results with an explicit alias using `[AS] alias`. For + # more information, see [BigQuery explicit + # aliases](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#explicit_alias_syntax). + # + # Example: `SELECT MIN(col1) AS min_col1, MAX(col1) AS max_col1 FROM + # $\\{data()}` + # @!attribute [rw] description + # @return [::String] + # Optional. Specifies the description of the debug query. + # + # * The maximum length is 1,024 characters. + # @!attribute [rw] sql_statement + # @return [::String] + # Required. Specifies the SQL statement to be executed. + class DebugQuery + 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/datascans_common.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb index fb9d1914a035..e686478e2fcc 100644 --- a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb +++ b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb @@ -22,10 +22,11 @@ module Cloud module Dataplex module V1 # The status of publishing the data scan result as Dataplex Universal Catalog - # metadata. + # metadata. Multiple DataScan log events may exist, each with different + # publishing information depending on the type of publishing triggered. # @!attribute [r] state # @return [::Google::Cloud::Dataplex::V1::DataScanCatalogPublishingStatus::State] - # Output only. Execution state for catalog publishing. + # Output only. Execution state for publishing. class DataScanCatalogPublishingStatus include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -35,11 +36,14 @@ module State # The publishing state is unspecified. STATE_UNSPECIFIED = 0 - # Publish to catalog completed successfully. + # Publishing to catalog completed successfully. SUCCEEDED = 1 # Publish to catalog failed. FAILED = 2 + + # Publishing to catalog was skipped. + SKIPPED = 3 end end end 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 7a29126583d2..b49f3c5cb3eb 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 @@ -751,6 +751,9 @@ module Trigger # Data scan triggers as per schedule. SCHEDULE = 2 + + # Data scan is run one time on creation. + ONE_TIME = 3 end # The scope of job for the data scan. diff --git a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb index f74fc4bed9fe..878183a9b0f6 100644 --- a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb +++ b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb @@ -26,12 +26,18 @@ module V1 # @return [::Google::Cloud::Dataplex::V1::Trigger::OnDemand] # The scan runs once via `RunDataScan` API. # - # Note: The following fields are mutually exclusive: `on_demand`, `schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `on_demand`, `schedule`, `one_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] schedule # @return [::Google::Cloud::Dataplex::V1::Trigger::Schedule] # The scan is scheduled to run periodically. # - # Note: The following fields are mutually exclusive: `schedule`, `on_demand`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `schedule`, `on_demand`, `one_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] one_time + # @return [::Google::Cloud::Dataplex::V1::Trigger::OneTime] + # The scan runs once, and does not create an associated ScanJob child + # resource. + # + # Note: The following fields are mutually exclusive: `one_time`, `on_demand`, `schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Trigger include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -61,6 +67,19 @@ class Schedule include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # The scan runs once using create API. + # @!attribute [rw] ttl_after_scan_completion + # @return [::Google::Protobuf::Duration] + # Optional. Time to live for OneTime scans. + # default value is 24 hours, minimum value is 0 seconds, and maximum value + # is 365 days. The time is calculated from the data scan job completion + # time. If value is set as 0 seconds, the scan will be immediately deleted + # upon job completion, regardless of whether the job succeeded or failed. + class OneTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # The data source for DataScan. diff --git a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb index cb8bbd160fb8..14166ad35604 100644 --- a/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb +++ b/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb @@ -649,154 +649,6 @@ 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 diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb b/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb similarity index 73% rename from google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb index b460d4726204..afd8894dc4e8 100644 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb +++ b/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] +# [START dataplex_v1_generated_CatalogService_CreateMetadataFeed_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the update_environment call in the DataplexService service +# Snippet for the create_metadata_feed 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: @@ -29,17 +29,17 @@ # client 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. +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_feed. # -def update_environment +def create_metadata_feed # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new + request = Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest.new - # Call the update_environment method. - result = client.update_environment request + # Call the create_metadata_feed method. + result = client.create_metadata_feed request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. @@ -51,4 +51,4 @@ def update_environment puts "No response received." end end -# [END dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] +# [END dataplex_v1_generated_CatalogService_CreateMetadataFeed_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb b/google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb similarity index 73% rename from google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb index b6fb80cea65b..207abc70da79 100644 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb +++ b/google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_DataplexService_CreateEnvironment_sync] +# [START dataplex_v1_generated_CatalogService_DeleteMetadataFeed_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the create_environment call in the DataplexService service +# Snippet for the delete_metadata_feed 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: @@ -29,17 +29,17 @@ # client 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. +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_metadata_feed. # -def create_environment +def delete_metadata_feed # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new + request = Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest.new - # Call the create_environment method. - result = client.create_environment request + # Call the delete_metadata_feed method. + result = client.delete_metadata_feed request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. @@ -51,4 +51,4 @@ def create_environment puts "No response received." end end -# [END dataplex_v1_generated_DataplexService_CreateEnvironment_sync] +# [END dataplex_v1_generated_CatalogService_DeleteMetadataFeed_sync] diff --git a/google-cloud-dataplex-v1/snippets/content_service/update_content.rb b/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb similarity index 70% rename from google-cloud-dataplex-v1/snippets/content_service/update_content.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb index f2ea109d392a..53455b6dd2ff 100644 --- a/google-cloud-dataplex-v1/snippets/content_service/update_content.rb +++ b/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_ContentService_UpdateContent_sync] +# [START dataplex_v1_generated_CatalogService_GetMetadataFeed_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the update_content call in the ContentService service +# Snippet for the get_metadata_feed 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: @@ -29,19 +29,19 @@ # client 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. +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_feed. # -def update_content +def get_metadata_feed # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new + request = Google::Cloud::Dataplex::V1::GetMetadataFeedRequest.new - # Call the update_content method. - result = client.update_content request + # Call the get_metadata_feed method. + result = client.get_metadata_feed request - # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # The returned object is of type Google::Cloud::Dataplex::V1::MetadataFeed. p result end -# [END dataplex_v1_generated_ContentService_UpdateContent_sync] +# [END dataplex_v1_generated_CatalogService_GetMetadataFeed_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb b/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb similarity index 69% rename from google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb index da0322aca341..b45e1252032e 100644 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb +++ b/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_DataplexService_ListSessions_sync] +# [START dataplex_v1_generated_CatalogService_ListMetadataFeeds_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the list_sessions call in the DataplexService service +# Snippet for the list_metadata_feeds 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: @@ -29,23 +29,23 @@ # client 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. +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_feeds. # -def list_sessions +def list_metadata_feeds # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new + request = Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest.new - # Call the list_sessions method. - result = client.list_sessions request + # Call the list_metadata_feeds method. + result = client.list_metadata_feeds request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, 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. + # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataFeed. p item end end -# [END dataplex_v1_generated_DataplexService_ListSessions_sync] +# [END dataplex_v1_generated_CatalogService_ListMetadataFeeds_sync] diff --git a/google-cloud-dataplex-v1/snippets/content_service/create_content.rb b/google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb similarity index 71% rename from google-cloud-dataplex-v1/snippets/content_service/create_content.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb index bdf4fe8dcf0a..8f88ea23a4f5 100644 --- a/google-cloud-dataplex-v1/snippets/content_service/create_content.rb +++ b/google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_ContentService_CreateContent_sync] +# [START dataplex_v1_generated_CatalogService_LookupContext_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the create_content call in the ContentService service +# Snippet for the lookup_context 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: @@ -29,19 +29,19 @@ # client 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. +# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_context. # -def create_content +def lookup_context # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateContentRequest.new + request = Google::Cloud::Dataplex::V1::LookupContextRequest.new - # Call the create_content method. - result = client.create_content request + # Call the lookup_context method. + result = client.lookup_context request - # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # The returned object is of type Google::Cloud::Dataplex::V1::LookupContextResponse. p result end -# [END dataplex_v1_generated_ContentService_CreateContent_sync] +# [END dataplex_v1_generated_CatalogService_LookupContext_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb b/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb similarity index 70% rename from google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb index cbe5fba5c88f..a1ac0ee161e7 100644 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb +++ b/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_DataplexService_ListEnvironments_sync] +# [START dataplex_v1_generated_CatalogService_LookupEntryLinks_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the list_environments call in the DataplexService service +# Snippet for the lookup_entry_links 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: @@ -29,23 +29,23 @@ # client 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. +# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry_links. # -def list_environments +def lookup_entry_links # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new + request = Google::Cloud::Dataplex::V1::LookupEntryLinksRequest.new - # Call the list_environments method. - result = client.list_environments request + # Call the lookup_entry_links method. + result = client.lookup_entry_links request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, 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. + # Each element is of type ::Google::Cloud::Dataplex::V1::EntryLink. p item end end -# [END dataplex_v1_generated_DataplexService_ListEnvironments_sync] +# [END dataplex_v1_generated_CatalogService_LookupEntryLinks_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb b/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb similarity index 71% rename from google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb index 67e74c93fbab..c57dfc9989b0 100644 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb +++ b/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_DataplexService_GetEnvironment_sync] +# [START dataplex_v1_generated_CatalogService_UpdateEntryLink_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the get_environment call in the DataplexService service +# Snippet for the update_entry_link 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: @@ -29,19 +29,19 @@ # client 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. +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_link. # -def get_environment +def update_entry_link # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new + request = Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest.new - # Call the get_environment method. - result = client.get_environment request + # Call the update_entry_link method. + result = client.update_entry_link request - # The returned object is of type Google::Cloud::Dataplex::V1::Environment. + # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. p result end -# [END dataplex_v1_generated_DataplexService_GetEnvironment_sync] +# [END dataplex_v1_generated_CatalogService_UpdateEntryLink_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb b/google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb similarity index 73% rename from google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb index 6c4ad993561a..1a59ced96990 100644 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb +++ b/google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] +# [START dataplex_v1_generated_CatalogService_UpdateMetadataFeed_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the delete_environment call in the DataplexService service +# Snippet for the update_metadata_feed 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: @@ -29,17 +29,17 @@ # client 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. +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_metadata_feed. # -def delete_environment +def update_metadata_feed # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new + request = Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest.new - # Call the delete_environment method. - result = client.delete_environment request + # Call the update_metadata_feed method. + result = client.update_metadata_feed request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. @@ -51,4 +51,4 @@ def delete_environment puts "No response received." end end -# [END dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] +# [END dataplex_v1_generated_CatalogService_UpdateMetadataFeed_sync] diff --git a/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb b/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb deleted file mode 100644 index 90cdb908304e..000000000000 --- a/google-cloud-dataplex-v1/snippets/content_service/delete_content.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# 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/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb b/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb deleted file mode 100644 index 2706a73ae537..000000000000 --- a/google-cloud-dataplex-v1/snippets/content_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# 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/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb b/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb deleted file mode 100644 index 94434656ce1a..000000000000 --- a/google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# 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/google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb b/google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb new file mode 100644 index 000000000000..ba942509436a --- /dev/null +++ b/google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataProductService_CreateDataAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_asset call in the DataProductService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_asset. +# +def create_data_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataAssetRequest.new + + # Call the create_data_asset method. + result = client.create_data_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_DataProductService_CreateDataAsset_sync] diff --git a/google-cloud-dataplex-v1/snippets/data_product_service/create_data_product.rb b/google-cloud-dataplex-v1/snippets/data_product_service/create_data_product.rb new file mode 100644 index 000000000000..43b53a2fc413 --- /dev/null +++ b/google-cloud-dataplex-v1/snippets/data_product_service/create_data_product.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataProductService_CreateDataProduct_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_product call in the DataProductService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_product. +# +def create_data_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataProductRequest.new + + # Call the create_data_product method. + result = client.create_data_product request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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_DataProductService_CreateDataProduct_sync] diff --git a/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_asset.rb b/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_asset.rb new file mode 100644 index 000000000000..23c6b3e0de7a --- /dev/null +++ b/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataProductService_DeleteDataAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_asset call in the DataProductService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataProductService::Client#delete_data_asset. +# +def delete_data_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataAssetRequest.new + + # Call the delete_data_asset method. + result = client.delete_data_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_DataProductService_DeleteDataAsset_sync] diff --git a/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_product.rb b/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_product.rb new file mode 100644 index 000000000000..b6370392560d --- /dev/null +++ b/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_product.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataProductService_DeleteDataProduct_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_product call in the DataProductService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataProductService::Client#delete_data_product. +# +def delete_data_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataProductRequest.new + + # Call the delete_data_product method. + result = client.delete_data_product request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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_DataProductService_DeleteDataProduct_sync] diff --git a/google-cloud-dataplex-v1/snippets/content_service/get_content.rb b/google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb similarity index 70% rename from google-cloud-dataplex-v1/snippets/content_service/get_content.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb index 9ca09e479316..1bbfee6646a8 100644 --- a/google-cloud-dataplex-v1/snippets/content_service/get_content.rb +++ b/google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_ContentService_GetContent_sync] +# [START dataplex_v1_generated_DataProductService_GetDataAsset_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the get_content call in the ContentService service +# Snippet for the get_data_asset call in the DataProductService service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,19 +29,19 @@ # client 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. +# Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_asset. # -def get_content +def get_data_asset # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetContentRequest.new + request = Google::Cloud::Dataplex::V1::GetDataAssetRequest.new - # Call the get_content method. - result = client.get_content request + # Call the get_data_asset method. + result = client.get_data_asset request - # The returned object is of type Google::Cloud::Dataplex::V1::Content. + # The returned object is of type Google::Cloud::Dataplex::V1::DataAsset. p result end -# [END dataplex_v1_generated_ContentService_GetContent_sync] +# [END dataplex_v1_generated_DataProductService_GetDataAsset_sync] diff --git a/google-cloud-dataplex-v1/snippets/data_product_service/get_data_product.rb b/google-cloud-dataplex-v1/snippets/data_product_service/get_data_product.rb new file mode 100644 index 000000000000..6d5e4d773307 --- /dev/null +++ b/google-cloud-dataplex-v1/snippets/data_product_service/get_data_product.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataProductService_GetDataProduct_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_product call in the DataProductService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_product. +# +def get_data_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataProductRequest.new + + # Call the get_data_product method. + result = client.get_data_product request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataProduct. + p result +end +# [END dataplex_v1_generated_DataProductService_GetDataProduct_sync] diff --git a/google-cloud-dataplex-v1/snippets/content_service/list_content.rb b/google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb similarity index 69% rename from google-cloud-dataplex-v1/snippets/content_service/list_content.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb index 8fcca141e14c..44c24349cbf7 100644 --- a/google-cloud-dataplex-v1/snippets/content_service/list_content.rb +++ b/google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_ContentService_ListContent_sync] +# [START dataplex_v1_generated_DataProductService_ListDataAssets_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the list_content call in the ContentService service +# Snippet for the list_data_assets call in the DataProductService service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,23 +29,23 @@ # client 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. +# Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_assets. # -def list_content +def list_data_assets # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListContentRequest.new + request = Google::Cloud::Dataplex::V1::ListDataAssetsRequest.new - # Call the list_content method. - result = client.list_content request + # Call the list_data_assets method. + result = client.list_data_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::Content. + # Each element is of type ::Google::Cloud::Dataplex::V1::DataAsset. p item end end -# [END dataplex_v1_generated_ContentService_ListContent_sync] +# [END dataplex_v1_generated_DataProductService_ListDataAssets_sync] diff --git a/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb b/google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb similarity index 60% rename from google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb index 56979685d515..7149bc2dc5cb 100644 --- a/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb +++ b/google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! -# [START dataplex_v1_generated_ContentService_TestIamPermissions_sync] +# [START dataplex_v1_generated_DataProductService_ListDataProducts_sync] require "google/cloud/dataplex/v1" ## -# Snippet for the test_iam_permissions call in the ContentService service +# Snippet for the list_data_products call in the DataProductService service # # This snippet has been automatically generated and should be regarded as a code # template only. It will require modifications to work: @@ -29,19 +29,23 @@ # client 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. +# Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_products. # -def test_iam_permissions +def list_data_products # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new + request = Google::Cloud::Dataplex::V1::ListDataProductsRequest.new - # Call the test_iam_permissions method. - result = client.test_iam_permissions request + # Call the list_data_products method. + result = client.list_data_products request - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataProduct. + p item + end end -# [END dataplex_v1_generated_ContentService_TestIamPermissions_sync] +# [END dataplex_v1_generated_DataProductService_ListDataProducts_sync] diff --git a/google-cloud-dataplex-v1/snippets/data_product_service/update_data_asset.rb b/google-cloud-dataplex-v1/snippets/data_product_service/update_data_asset.rb new file mode 100644 index 000000000000..92a11ec7490f --- /dev/null +++ b/google-cloud-dataplex-v1/snippets/data_product_service/update_data_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataProductService_UpdateDataAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_asset call in the DataProductService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataProductService::Client#update_data_asset. +# +def update_data_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataAssetRequest.new + + # Call the update_data_asset method. + result = client.update_data_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_DataProductService_UpdateDataAsset_sync] diff --git a/google-cloud-dataplex-v1/snippets/data_product_service/update_data_product.rb b/google-cloud-dataplex-v1/snippets/data_product_service/update_data_product.rb new file mode 100644 index 000000000000..78a196fc14e0 --- /dev/null +++ b/google-cloud-dataplex-v1/snippets/data_product_service/update_data_product.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataplex_v1_generated_DataProductService_UpdateDataProduct_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_product call in the DataProductService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataProductService::Client#update_data_product. +# +def update_data_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataProductService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataProductRequest.new + + # Call the update_data_product method. + result = client.update_data_product request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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_DataProductService_UpdateDataProduct_sync] diff --git a/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json b/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json index 8940c11710c2..3681f645b86d 100644 --- a/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json +++ b/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json @@ -1091,246 +1091,6 @@ } ] }, - { - "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_BusinessGlossaryService_CreateGlossary_sync", "title": "Snippet for the create_glossary call in the BusinessGlossaryService service", @@ -3011,6 +2771,46 @@ } ] }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryLink_sync", + "title": "Snippet for the update_entry_link call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_link.", + "file": "catalog_service/update_entry_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry_link", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::EntryLink", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntryLink", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryLink", + "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_DeleteEntryLink_sync", "title": "Snippet for the delete_entry_link call in the CatalogService service", @@ -3051,6 +2851,86 @@ } ] }, + { + "region_tag": "dataplex_v1_generated_CatalogService_LookupEntryLinks_sync", + "title": "Snippet for the lookup_entry_links call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry_links.", + "file": "catalog_service/lookup_entry_links.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_entry_links", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry_links", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::LookupEntryLinksResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "LookupEntryLinks", + "full_name": "google.cloud.dataplex.v1.CatalogService.LookupEntryLinks", + "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_LookupContext_sync", + "title": "Snippet for the lookup_context call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_context.", + "file": "catalog_service/lookup_context.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_context", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_context", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::LookupContextRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::LookupContextResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "LookupContext", + "full_name": "google.cloud.dataplex.v1.CatalogService.LookupContext", + "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_GetEntryLink_sync", "title": "Snippet for the get_entry_link call in the CatalogService service", @@ -3091,6 +2971,206 @@ } ] }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateMetadataFeed_sync", + "title": "Snippet for the create_metadata_feed call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_feed.", + "file": "catalog_service/create_metadata_feed.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_metadata_feed", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_feed", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateMetadataFeed", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateMetadataFeed", + "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_GetMetadataFeed_sync", + "title": "Snippet for the get_metadata_feed call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_feed.", + "file": "catalog_service/get_metadata_feed.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_metadata_feed", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_feed", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::MetadataFeed", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetMetadataFeed", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetMetadataFeed", + "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_ListMetadataFeeds_sync", + "title": "Snippet for the list_metadata_feeds call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_feeds.", + "file": "catalog_service/list_metadata_feeds.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_metadata_feeds", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_feeds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListMetadataFeedsResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListMetadataFeeds", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListMetadataFeeds", + "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_DeleteMetadataFeed_sync", + "title": "Snippet for the delete_metadata_feed call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_metadata_feed.", + "file": "catalog_service/delete_metadata_feed.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_metadata_feed", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_metadata_feed", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteMetadataFeed", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteMetadataFeed", + "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_UpdateMetadataFeed_sync", + "title": "Snippet for the update_metadata_feed call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_metadata_feed.", + "file": "catalog_service/update_metadata_feed.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_metadata_feed", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_metadata_feed", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateMetadataFeed", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateMetadataFeed", + "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_CmekService_CreateEncryptionConfig_sync", "title": "Snippet for the create_encryption_config call in the CmekService service", @@ -3292,32 +3372,32 @@ ] }, { - "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", + "region_tag": "dataplex_v1_generated_DataProductService_CreateDataProduct_sync", + "title": "Snippet for the create_data_product call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_product.", + "file": "data_product_service/create_data_product.rb", "language": "RUBY", "client_method": { - "short_name": "create_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#create_content", + "short_name": "create_data_product", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_product", "async": false, "parameters": [ { - "type": "::Google::Cloud::Dataplex::V1::CreateContentRequest", + "type": "::Google::Cloud::Dataplex::V1::CreateDataProductRequest", "name": "request" } ], - "result_type": "::Google::Cloud::Dataplex::V1::Content", + "result_type": "::Google::Longrunning::Operation", "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" }, "method": { - "short_name": "CreateContent", - "full_name": "google.cloud.dataplex.v1.ContentService.CreateContent", + "short_name": "CreateDataProduct", + "full_name": "google.cloud.dataplex.v1.DataProductService.CreateDataProduct", "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" } } }, @@ -3326,38 +3406,38 @@ "segments": [ { "start": 20, - "end": 46, + "end": 53, "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", + "region_tag": "dataplex_v1_generated_DataProductService_DeleteDataProduct_sync", + "title": "Snippet for the delete_data_product call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#delete_data_product.", + "file": "data_product_service/delete_data_product.rb", "language": "RUBY", "client_method": { - "short_name": "update_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#update_content", + "short_name": "delete_data_product", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#delete_data_product", "async": false, "parameters": [ { - "type": "::Google::Cloud::Dataplex::V1::UpdateContentRequest", + "type": "::Google::Cloud::Dataplex::V1::DeleteDataProductRequest", "name": "request" } ], - "result_type": "::Google::Cloud::Dataplex::V1::Content", + "result_type": "::Google::Longrunning::Operation", "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" }, "method": { - "short_name": "UpdateContent", - "full_name": "google.cloud.dataplex.v1.ContentService.UpdateContent", + "short_name": "DeleteDataProduct", + "full_name": "google.cloud.dataplex.v1.DataProductService.DeleteDataProduct", "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" } } }, @@ -3366,38 +3446,38 @@ "segments": [ { "start": 20, - "end": 46, + "end": 53, "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", + "region_tag": "dataplex_v1_generated_DataProductService_GetDataProduct_sync", + "title": "Snippet for the get_data_product call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_product.", + "file": "data_product_service/get_data_product.rb", "language": "RUBY", "client_method": { - "short_name": "delete_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#delete_content", + "short_name": "get_data_product", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_product", "async": false, "parameters": [ { - "type": "::Google::Cloud::Dataplex::V1::DeleteContentRequest", + "type": "::Google::Cloud::Dataplex::V1::GetDataProductRequest", "name": "request" } ], - "result_type": "::Google::Protobuf::Empty", + "result_type": "::Google::Cloud::Dataplex::V1::DataProduct", "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" }, "method": { - "short_name": "DeleteContent", - "full_name": "google.cloud.dataplex.v1.ContentService.DeleteContent", + "short_name": "GetDataProduct", + "full_name": "google.cloud.dataplex.v1.DataProductService.GetDataProduct", "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" } } }, @@ -3412,32 +3492,32 @@ ] }, { - "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", + "region_tag": "dataplex_v1_generated_DataProductService_ListDataProducts_sync", + "title": "Snippet for the list_data_products call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_products.", + "file": "data_product_service/list_data_products.rb", "language": "RUBY", "client_method": { - "short_name": "get_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_content", + "short_name": "list_data_products", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_products", "async": false, "parameters": [ { - "type": "::Google::Cloud::Dataplex::V1::GetContentRequest", + "type": "::Google::Cloud::Dataplex::V1::ListDataProductsRequest", "name": "request" } ], - "result_type": "::Google::Cloud::Dataplex::V1::Content", + "result_type": "::Google::Cloud::Dataplex::V1::ListDataProductsResponse", "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" }, "method": { - "short_name": "GetContent", - "full_name": "google.cloud.dataplex.v1.ContentService.GetContent", + "short_name": "ListDataProducts", + "full_name": "google.cloud.dataplex.v1.DataProductService.ListDataProducts", "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" } } }, @@ -3446,38 +3526,38 @@ "segments": [ { "start": 20, - "end": 46, + "end": 50, "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", + "region_tag": "dataplex_v1_generated_DataProductService_UpdateDataProduct_sync", + "title": "Snippet for the update_data_product call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#update_data_product.", + "file": "data_product_service/update_data_product.rb", "language": "RUBY", "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#get_iam_policy", + "short_name": "update_data_product", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#update_data_product", "async": false, "parameters": [ { - "type": "::Google::Iam::V1::GetIamPolicyRequest", + "type": "::Google::Cloud::Dataplex::V1::UpdateDataProductRequest", "name": "request" } ], - "result_type": "::Google::Iam::V1::Policy", + "result_type": "::Google::Longrunning::Operation", "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" }, "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.dataplex.v1.ContentService.GetIamPolicy", + "short_name": "UpdateDataProduct", + "full_name": "google.cloud.dataplex.v1.DataProductService.UpdateDataProduct", "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" } } }, @@ -3486,38 +3566,38 @@ "segments": [ { "start": 20, - "end": 46, + "end": 53, "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", + "region_tag": "dataplex_v1_generated_DataProductService_CreateDataAsset_sync", + "title": "Snippet for the create_data_asset call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_asset.", + "file": "data_product_service/create_data_asset.rb", "language": "RUBY", "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#set_iam_policy", + "short_name": "create_data_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_asset", "async": false, "parameters": [ { - "type": "::Google::Iam::V1::SetIamPolicyRequest", + "type": "::Google::Cloud::Dataplex::V1::CreateDataAssetRequest", "name": "request" } ], - "result_type": "::Google::Iam::V1::Policy", + "result_type": "::Google::Longrunning::Operation", "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" }, "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.dataplex.v1.ContentService.SetIamPolicy", + "short_name": "CreateDataAsset", + "full_name": "google.cloud.dataplex.v1.DataProductService.CreateDataAsset", "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" } } }, @@ -3526,38 +3606,118 @@ "segments": [ { "start": 20, - "end": 46, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataProductService_UpdateDataAsset_sync", + "title": "Snippet for the update_data_asset call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#update_data_asset.", + "file": "data_product_service/update_data_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#update_data_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "UpdateDataAsset", + "full_name": "google.cloud.dataplex.v1.DataProductService.UpdateDataAsset", + "service": { + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataProductService_DeleteDataAsset_sync", + "title": "Snippet for the delete_data_asset call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#delete_data_asset.", + "file": "data_product_service/delete_data_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#delete_data_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "DeleteDataAsset", + "full_name": "google.cloud.dataplex.v1.DataProductService.DeleteDataAsset", + "service": { + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, "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", + "region_tag": "dataplex_v1_generated_DataProductService_GetDataAsset_sync", + "title": "Snippet for the get_data_asset call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_asset.", + "file": "data_product_service/get_data_asset.rb", "language": "RUBY", "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions", + "short_name": "get_data_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_asset", "async": false, "parameters": [ { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "type": "::Google::Cloud::Dataplex::V1::GetDataAssetRequest", "name": "request" } ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "result_type": "::Google::Cloud::Dataplex::V1::DataAsset", "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" }, "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.dataplex.v1.ContentService.TestIamPermissions", + "short_name": "GetDataAsset", + "full_name": "google.cloud.dataplex.v1.DataProductService.GetDataAsset", "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" } } }, @@ -3572,32 +3732,32 @@ ] }, { - "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", + "region_tag": "dataplex_v1_generated_DataProductService_ListDataAssets_sync", + "title": "Snippet for the list_data_assets call in the DataProductService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_assets.", + "file": "data_product_service/list_data_assets.rb", "language": "RUBY", "client_method": { - "short_name": "list_content", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client#list_content", + "short_name": "list_data_assets", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_assets", "async": false, "parameters": [ { - "type": "::Google::Cloud::Dataplex::V1::ListContentRequest", + "type": "::Google::Cloud::Dataplex::V1::ListDataAssetsRequest", "name": "request" } ], - "result_type": "::Google::Cloud::Dataplex::V1::ListContentResponse", + "result_type": "::Google::Cloud::Dataplex::V1::ListDataAssetsResponse", "client": { - "short_name": "ContentService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::ContentService::Client" + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" }, "method": { - "short_name": "ListContent", - "full_name": "google.cloud.dataplex.v1.ContentService.ListContent", + "short_name": "ListDataAssets", + "full_name": "google.cloud.dataplex.v1.DataProductService.ListDataAssets", "service": { - "short_name": "ContentService", - "full_name": "google.cloud.dataplex.v1.ContentService" + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" } } }, diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb index 9198535d1726..729d3f076dad 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb @@ -125,6 +125,18 @@ def test_location_path end end + def test_metadata_feed_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.metadata_feed_path project: "value0", location: "value1", metadata_feed: "value2" + assert_equal "projects/value0/locations/value1/metadataFeeds/value2", path + end + end + def test_metadata_job_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb index 3b18c4496e64..01ce63f3958a 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb @@ -1597,6 +1597,62 @@ def test_create_entry_link end end + def test_update_entry_link + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::EntryLink.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry_link = {} + allow_missing = true + aspect_keys = ["hello world"] + + update_entry_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-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_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_link_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_link({ entry_link: entry_link, allow_missing: allow_missing, aspect_keys: aspect_keys }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry_link entry_link: entry_link, allow_missing: allow_missing, aspect_keys: aspect_keys do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry_link ::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest.new(entry_link: entry_link, allow_missing: allow_missing, aspect_keys: aspect_keys) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry_link({ entry_link: entry_link, allow_missing: allow_missing, 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_link(::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest.new(entry_link: entry_link, allow_missing: allow_missing, 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_link_client_stub.call_count + end + end + end + def test_delete_entry_link # Create test objects. client_result = ::Google::Cloud::Dataplex::V1::EntryLink.new @@ -1651,6 +1707,121 @@ def test_delete_entry_link end end + def test_lookup_entry_links + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::LookupEntryLinksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + entry = "hello world" + entry_mode = :ENTRY_MODE_UNSPECIFIED + entry_link_types = ["hello world"] + page_size = 42 + page_token = "hello world" + + lookup_entry_links_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-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_links_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_entry_links_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_links({ name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_entry_links name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_entry_links ::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest.new(name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, 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.lookup_entry_links({ name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, 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.lookup_entry_links(::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest.new(name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, 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, lookup_entry_links_client_stub.call_count + end + end + end + + def test_lookup_context + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::LookupContextResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + resources = ["hello world"] + options = {} + + lookup_context_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-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_context_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_context_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_context({ name: name, resources: resources, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_context name: name, resources: resources, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_context ::Google::Cloud::Dataplex::V1::LookupContextRequest.new(name: name, resources: resources, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lookup_context({ name: name, resources: resources, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lookup_context(::Google::Cloud::Dataplex::V1::LookupContextRequest.new(name: name, resources: resources, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_context_client_stub.call_count + end + end + end + def test_get_entry_link # Create test objects. client_result = ::Google::Cloud::Dataplex::V1::EntryLink.new @@ -1705,6 +1876,285 @@ def test_get_entry_link end end + def test_create_metadata_feed + # 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" + metadata_feed = {} + metadata_feed_id = "hello world" + validate_only = true + + create_metadata_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-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_metadata_feed_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_metadata_feed_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_metadata_feed({ parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_metadata_feed parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_metadata_feed ::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest.new(parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_metadata_feed({ parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_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_metadata_feed(::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest.new(parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_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_metadata_feed_client_stub.call_count + end + end + end + + def test_get_metadata_feed + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::MetadataFeed.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_metadata_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-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_metadata_feed_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_metadata_feed_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_metadata_feed({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_metadata_feed name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_metadata_feed ::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_metadata_feed({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_metadata_feed(::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_metadata_feed_client_stub.call_count + end + end + end + + def test_list_metadata_feeds + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListMetadataFeedsResponse.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_metadata_feeds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-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_metadata_feeds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_metadata_feeds_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_metadata_feeds({ 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_metadata_feeds 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_metadata_feeds ::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest.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_metadata_feeds({ 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_metadata_feeds(::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest.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_metadata_feeds_client_stub.call_count + end + end + end + + def test_delete_metadata_feed + # 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_metadata_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-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_metadata_feed_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_metadata_feed_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_metadata_feed({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_metadata_feed name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_metadata_feed ::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_metadata_feed({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_metadata_feed(::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_metadata_feed_client_stub.call_count + end + end + end + + def test_update_metadata_feed + # 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. + metadata_feed = {} + update_mask = {} + validate_only = true + + update_metadata_feed_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-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_metadata_feed_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_metadata_feed_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_metadata_feed({ metadata_feed: metadata_feed, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_metadata_feed metadata_feed: metadata_feed, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_metadata_feed ::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest.new(metadata_feed: metadata_feed, 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_metadata_feed({ metadata_feed: metadata_feed, 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_metadata_feed(::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest.new(metadata_feed: metadata_feed, 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_metadata_feed_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb index 7aaf9c429a5d..70e2aeb8d2ba 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb @@ -1831,6 +1831,68 @@ def test_create_entry_link end end + def test_update_entry_link + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::EntryLink.new + grpc_operation = GRPC::ActiveCall::Operation.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_link = {} + allow_missing = true + aspect_keys = ["hello world"] + + update_entry_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry_link, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryLink), request["entry_link"] + assert_equal true, request["allow_missing"] + assert_equal ["hello world"], request["aspect_keys"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_link_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_link({ entry_link: entry_link, allow_missing: allow_missing, aspect_keys: aspect_keys }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry_link entry_link: entry_link, allow_missing: allow_missing, aspect_keys: aspect_keys do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry_link ::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest.new(entry_link: entry_link, allow_missing: allow_missing, 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_link({ entry_link: entry_link, allow_missing: allow_missing, 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_link(::Google::Cloud::Dataplex::V1::UpdateEntryLinkRequest.new(entry_link: entry_link, allow_missing: allow_missing, 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_link_client_stub.call_rpc_count + end + end + def test_delete_entry_link # Create GRPC objects. grpc_response = ::Google::Cloud::Dataplex::V1::EntryLink.new @@ -1889,6 +1951,141 @@ def test_delete_entry_link end end + def test_lookup_entry_links + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::LookupEntryLinksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + entry = "hello world" + entry_mode = :ENTRY_MODE_UNSPECIFIED + entry_link_types = ["hello world"] + page_size = 42 + page_token = "hello world" + + lookup_entry_links_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_entry_links, name + assert_kind_of ::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["entry"] + assert_equal :ENTRY_MODE_UNSPECIFIED, request["entry_mode"] + assert_equal ["hello world"], request["entry_link_types"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_entry_links_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_links({ name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, 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.lookup_entry_links name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, 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.lookup_entry_links ::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest.new(name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, 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.lookup_entry_links({ name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, 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.lookup_entry_links(::Google::Cloud::Dataplex::V1::LookupEntryLinksRequest.new(name: name, entry: entry, entry_mode: entry_mode, entry_link_types: entry_link_types, 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, lookup_entry_links_client_stub.call_rpc_count + end + end + + def test_lookup_context + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::LookupContextResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + resources = ["hello world"] + options = {} + + lookup_context_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_context, name + assert_kind_of ::Google::Cloud::Dataplex::V1::LookupContextRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["resources"] + assert_equal({}, request["options"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_context_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_context({ name: name, resources: resources, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lookup_context name: name, resources: resources, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lookup_context ::Google::Cloud::Dataplex::V1::LookupContextRequest.new(name: name, resources: resources, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lookup_context({ name: name, resources: resources, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lookup_context(::Google::Cloud::Dataplex::V1::LookupContextRequest.new(name: name, resources: resources, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_context_client_stub.call_rpc_count + end + end + def test_get_entry_link # Create GRPC objects. grpc_response = ::Google::Cloud::Dataplex::V1::EntryLink.new @@ -1947,6 +2144,334 @@ def test_get_entry_link end end + def test_create_metadata_feed + # 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" + metadata_feed = {} + metadata_feed_id = "hello world" + validate_only = true + + create_metadata_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_metadata_feed, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::MetadataFeed), request["metadata_feed"] + assert_equal "hello world", request["metadata_feed_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_metadata_feed_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_metadata_feed({ parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_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_metadata_feed parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_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_metadata_feed ::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest.new(parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_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_metadata_feed({ parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_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_metadata_feed(::Google::Cloud::Dataplex::V1::CreateMetadataFeedRequest.new(parent: parent, metadata_feed: metadata_feed, metadata_feed_id: metadata_feed_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_metadata_feed_client_stub.call_rpc_count + end + end + + def test_get_metadata_feed + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::MetadataFeed.new + grpc_operation = GRPC::ActiveCall::Operation.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_metadata_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_metadata_feed, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_metadata_feed_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_metadata_feed({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_metadata_feed name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_metadata_feed ::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_metadata_feed({ 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_metadata_feed(::Google::Cloud::Dataplex::V1::GetMetadataFeedRequest.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_metadata_feed_client_stub.call_rpc_count + end + end + + def test_list_metadata_feeds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListMetadataFeedsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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_metadata_feeds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_metadata_feeds, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest, 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_metadata_feeds_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_metadata_feeds({ 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_metadata_feeds 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_metadata_feeds ::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest.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_metadata_feeds({ 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_metadata_feeds(::Google::Cloud::Dataplex::V1::ListMetadataFeedsRequest.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_metadata_feeds_client_stub.call_rpc_count + end + end + + def test_delete_metadata_feed + # 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_metadata_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_metadata_feed, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_metadata_feed_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_metadata_feed({ 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_metadata_feed 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_metadata_feed ::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest.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_metadata_feed({ 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_metadata_feed(::Google::Cloud::Dataplex::V1::DeleteMetadataFeedRequest.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_metadata_feed_client_stub.call_rpc_count + end + end + + def test_update_metadata_feed + # 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. + metadata_feed = {} + update_mask = {} + validate_only = true + + update_metadata_feed_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_metadata_feed, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::MetadataFeed), request["metadata_feed"] + 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_metadata_feed_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_metadata_feed({ metadata_feed: metadata_feed, 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_metadata_feed metadata_feed: metadata_feed, 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_metadata_feed ::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest.new(metadata_feed: metadata_feed, 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_metadata_feed({ metadata_feed: metadata_feed, 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_metadata_feed(::Google::Cloud::Dataplex::V1::UpdateMetadataFeedRequest.new(metadata_feed: metadata_feed, 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_metadata_feed_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb deleted file mode 100644 index f9f204c36ffa..000000000000 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb +++ /dev/null @@ -1,543 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - 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 - - def stub_logger - nil - end - - def logger - nil - 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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb deleted file mode 100644 index 9faa9eddd6fe..000000000000 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb +++ /dev/null @@ -1,597 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# 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_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) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - 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 - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - 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 = creds - end - assert_kind_of ::Google::Cloud::Dataplex::V1::ContentService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_operations_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_operations_test.rb new file mode 100644 index 000000000000..6dd62e92c49d --- /dev/null +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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_products_pb" +require "google/cloud/dataplex/v1/data_products_services_pb" +require "google/cloud/dataplex/v1/data_product_service" + +class ::Google::Cloud::Dataplex::V1::DataProductService::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) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + 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" + return_partial_success = true + + 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"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::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, return_partial_success: return_partial_success }) 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, return_partial_success: return_partial_success 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, return_partial_success: return_partial_success) 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, return_partial_success: return_partial_success }, 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, return_partial_success: return_partial_success), 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::DataProductService::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::DataProductService::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::DataProductService::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::DataProductService::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::DataProductService::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::DataProductService::Operations::Configuration, config + end +end diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb similarity index 51% rename from google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb rename to google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb index 85184dae84cb..e2e06391621a 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,9 +20,9 @@ require "gapic/grpc/service_stub" -require "google/cloud/dataplex/v1/content_service" +require "google/cloud/dataplex/v1/data_product_service" -class ::Google::Cloud::Dataplex::V1::ContentService::ClientPathsTest < Minitest::Test +class ::Google::Cloud::Dataplex::V1::DataProductService::ClientPathsTest < Minitest::Test class DummyStub def endpoint "endpoint.example.com" @@ -41,27 +41,39 @@ def logger end end - def test_content_path + def test_data_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::ContentService::Client.new do |config| + client = ::Google::Cloud::Dataplex::V1::DataProductService::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 + path = client.data_asset_path project: "value0", location: "value1", data_product: "value2", data_asset: "value3" + assert_equal "projects/value0/locations/value1/dataProducts/value2/dataAssets/value3", path end end - def test_lake_path + def test_data_product_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| + client = ::Google::Cloud::Dataplex::V1::DataProductService::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 + path = client.data_product_path project: "value0", location: "value1", data_product: "value2" + assert_equal "projects/value0/locations/value1/dataProducts/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::DataProductService::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/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_rest_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_rest_test.rb new file mode 100644 index 000000000000..ae5ceae51825 --- /dev/null +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_rest_test.rb @@ -0,0 +1,661 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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_products_pb" +require "google/cloud/dataplex/v1/data_product_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataProductService::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: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + 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 + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_data_product + # 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_product_id = "hello world" + data_product = {} + validate_only = true + + create_data_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_create_data_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_product_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_product({ parent: parent, data_product_id: data_product_id, data_product: data_product, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_product parent: parent, data_product_id: data_product_id, data_product: data_product, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_product ::Google::Cloud::Dataplex::V1::CreateDataProductRequest.new(parent: parent, data_product_id: data_product_id, data_product: data_product, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_product({ parent: parent, data_product_id: data_product_id, data_product: data_product, 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_product(::Google::Cloud::Dataplex::V1::CreateDataProductRequest.new(parent: parent, data_product_id: data_product_id, data_product: data_product, 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_product_client_stub.call_count + end + end + end + + def test_delete_data_product + # 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" + validate_only = true + + delete_data_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_delete_data_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_product_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_product({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_product name: name, etag: etag, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_product ::Google::Cloud::Dataplex::V1::DeleteDataProductRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_product({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_product(::Google::Cloud::Dataplex::V1::DeleteDataProductRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_product_client_stub.call_count + end + end + end + + def test_get_data_product + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataProduct.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_get_data_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_product_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_product ::Google::Cloud::Dataplex::V1::GetDataProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_product(::Google::Cloud::Dataplex::V1::GetDataProductRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_product_client_stub.call_count + end + end + end + + def test_list_data_products + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataProductsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_data_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_list_data_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_products_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_products({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_products parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_products ::Google::Cloud::Dataplex::V1::ListDataProductsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_products({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_products(::Google::Cloud::Dataplex::V1::ListDataProductsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_products_client_stub.call_count + end + end + end + + def test_update_data_product + # 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_product = {} + update_mask = {} + validate_only = true + + update_data_product_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_update_data_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_product_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_product({ data_product: data_product, 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_product data_product: data_product, 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_product ::Google::Cloud::Dataplex::V1::UpdateDataProductRequest.new(data_product: data_product, 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_product({ data_product: data_product, 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_product(::Google::Cloud::Dataplex::V1::UpdateDataProductRequest.new(data_product: data_product, 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_product_client_stub.call_count + end + end + end + + def test_create_data_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" + data_asset_id = "hello world" + data_asset = {} + validate_only = true + + create_data_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_create_data_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_asset({ parent: parent, data_asset_id: data_asset_id, data_asset: data_asset, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_asset parent: parent, data_asset_id: data_asset_id, data_asset: data_asset, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_asset ::Google::Cloud::Dataplex::V1::CreateDataAssetRequest.new(parent: parent, data_asset_id: data_asset_id, data_asset: data_asset, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_asset({ parent: parent, data_asset_id: data_asset_id, data_asset: data_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_data_asset(::Google::Cloud::Dataplex::V1::CreateDataAssetRequest.new(parent: parent, data_asset_id: data_asset_id, data_asset: data_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_data_asset_client_stub.call_count + end + end + end + + def test_update_data_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. + data_asset = {} + update_mask = {} + validate_only = true + + update_data_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_update_data_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_asset({ data_asset: data_asset, 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_asset data_asset: data_asset, 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_asset ::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest.new(data_asset: data_asset, 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_asset({ data_asset: data_asset, 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_asset(::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest.new(data_asset: data_asset, 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_asset_client_stub.call_count + end + end + end + + def test_delete_data_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" + etag = "hello world" + validate_only = true + + delete_data_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_delete_data_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_asset({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_asset name: name, etag: etag, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_asset ::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_asset({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_asset(::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_asset_client_stub.call_count + end + end + end + + def test_get_data_asset + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataAsset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_get_data_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_asset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_asset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_asset ::Google::Cloud::Dataplex::V1::GetDataAssetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_asset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_asset(::Google::Cloud::Dataplex::V1::GetDataAssetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_asset_client_stub.call_count + end + end + end + + def test_list_data_assets + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + page_size = 42 + page_token = "hello world" + + list_data_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataplex::V1::DataProductService::Rest::ServiceStub.stub :transcode_list_data_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_assets_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_assets({ parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_assets parent: parent, filter: filter, order_by: order_by, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_assets ::Google::Cloud::Dataplex::V1::ListDataAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, 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_data_assets({ parent: parent, filter: filter, order_by: order_by, 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_data_assets(::Google::Cloud::Dataplex::V1::ListDataAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, 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_data_assets_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::DataProductService::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::DataProductService::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_test.rb new file mode 100644 index 000000000000..6fdd458e5bfa --- /dev/null +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_test.rb @@ -0,0 +1,782 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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_products_pb" +require "google/cloud/dataplex/v1/data_product_service" + +class ::Google::Cloud::Dataplex::V1::DataProductService::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) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_data_product + # 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_product_id = "hello world" + data_product = {} + validate_only = true + + create_data_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_product, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataProductRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_product_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataProduct), request["data_product"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_product_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_product({ parent: parent, data_product_id: data_product_id, data_product: data_product, validate_only: validate_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_product parent: parent, data_product_id: data_product_id, data_product: data_product, validate_only: validate_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_product ::Google::Cloud::Dataplex::V1::CreateDataProductRequest.new(parent: parent, data_product_id: data_product_id, data_product: data_product, validate_only: validate_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_product({ parent: parent, data_product_id: data_product_id, data_product: data_product, 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_product(::Google::Cloud::Dataplex::V1::CreateDataProductRequest.new(parent: parent, data_product_id: data_product_id, data_product: data_product, 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_product_client_stub.call_rpc_count + end + end + + def test_delete_data_product + # 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" + validate_only = true + + delete_data_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_product, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataProductRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_product_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_product({ name: name, etag: etag, validate_only: validate_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.delete_data_product name: name, etag: etag, validate_only: validate_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.delete_data_product ::Google::Cloud::Dataplex::V1::DeleteDataProductRequest.new(name: name, etag: etag, validate_only: validate_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.delete_data_product({ name: name, etag: etag, 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.delete_data_product(::Google::Cloud::Dataplex::V1::DeleteDataProductRequest.new(name: name, etag: etag, 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, delete_data_product_client_stub.call_rpc_count + end + end + + def test_get_data_product + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataProduct.new + grpc_operation = GRPC::ActiveCall::Operation.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_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_product, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataProductRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_product_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_product ::Google::Cloud::Dataplex::V1::GetDataProductRequest.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_product({ 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_product(::Google::Cloud::Dataplex::V1::GetDataProductRequest.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_product_client_stub.call_rpc_count + end + end + + def test_list_data_products + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataProductsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_data_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_products, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataProductsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_products_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_products({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_products parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_products ::Google::Cloud::Dataplex::V1::ListDataProductsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_products({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_products(::Google::Cloud::Dataplex::V1::ListDataProductsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, 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_products_client_stub.call_rpc_count + end + end + + def test_update_data_product + # 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_product = {} + update_mask = {} + validate_only = true + + update_data_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_product, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataProductRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataProduct), request["data_product"] + 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_product_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_product({ data_product: data_product, 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_product data_product: data_product, 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_product ::Google::Cloud::Dataplex::V1::UpdateDataProductRequest.new(data_product: data_product, 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_product({ data_product: data_product, 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_product(::Google::Cloud::Dataplex::V1::UpdateDataProductRequest.new(data_product: data_product, 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_product_client_stub.call_rpc_count + end + end + + def test_create_data_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" + data_asset_id = "hello world" + data_asset = {} + validate_only = true + + create_data_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAssetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_asset_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAsset), request["data_asset"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_asset({ parent: parent, data_asset_id: data_asset_id, data_asset: data_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_data_asset parent: parent, data_asset_id: data_asset_id, data_asset: data_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_data_asset ::Google::Cloud::Dataplex::V1::CreateDataAssetRequest.new(parent: parent, data_asset_id: data_asset_id, data_asset: data_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_data_asset({ parent: parent, data_asset_id: data_asset_id, data_asset: data_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_data_asset(::Google::Cloud::Dataplex::V1::CreateDataAssetRequest.new(parent: parent, data_asset_id: data_asset_id, data_asset: data_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_data_asset_client_stub.call_rpc_count + end + end + + def test_update_data_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. + data_asset = {} + update_mask = {} + validate_only = true + + update_data_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAsset), request["data_asset"] + 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_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_asset({ data_asset: data_asset, 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_asset data_asset: data_asset, 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_asset ::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest.new(data_asset: data_asset, 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_asset({ data_asset: data_asset, 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_asset(::Google::Cloud::Dataplex::V1::UpdateDataAssetRequest.new(data_asset: data_asset, 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_asset_client_stub.call_rpc_count + end + end + + def test_delete_data_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" + etag = "hello world" + validate_only = true + + delete_data_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_asset({ name: name, etag: etag, validate_only: validate_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.delete_data_asset name: name, etag: etag, validate_only: validate_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.delete_data_asset ::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest.new(name: name, etag: etag, validate_only: validate_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.delete_data_asset({ name: name, etag: etag, 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.delete_data_asset(::Google::Cloud::Dataplex::V1::DeleteDataAssetRequest.new(name: name, etag: etag, 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, delete_data_asset_client_stub.call_rpc_count + end + end + + def test_get_data_asset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataAsset.new + grpc_operation = GRPC::ActiveCall::Operation.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_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAssetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_asset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_asset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_asset ::Google::Cloud::Dataplex::V1::GetDataAssetRequest.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_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_data_asset(::Google::Cloud::Dataplex::V1::GetDataAssetRequest.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_asset_client_stub.call_rpc_count + end + end + + def test_list_data_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + filter = "hello world" + order_by = "hello world" + page_size = 42 + page_token = "hello world" + + list_data_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_assets, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_assets_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_assets({ parent: parent, filter: filter, order_by: order_by, 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_data_assets parent: parent, filter: filter, order_by: order_by, 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_data_assets ::Google::Cloud::Dataplex::V1::ListDataAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, 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_data_assets({ parent: parent, filter: filter, order_by: order_by, 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_data_assets(::Google::Cloud::Dataplex::V1::ListDataAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, 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_data_assets_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::DataProductService::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::DataProductService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Dataplex::V1::DataProductService::Client, client + assert_equal creds, client.configure.credentials + end + 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::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataProductService::Operations, client.operations_client + end +end diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb index 3a3513dd1d1f..54151cbc4a2c 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb @@ -53,18 +53,6 @@ def test_asset_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 diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb index c6bb379cf4f7..c2d7ac11ea67 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb @@ -1582,342 +1582,6 @@ def test_cancel_job 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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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:, method_name:| - assert options.metadata.key? :"x-goog-api-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 diff --git a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb index 5a5b4d0da743..d7fbad64bad9 100644 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb +++ b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb @@ -1821,403 +1821,6 @@ def test_cancel_job 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 diff --git a/google-cloud-dataplex-v1/test/helper.rb b/google-cloud-dataplex-v1/test/helper.rb index 967a471669c1..c58423a60f2b 100644 --- a/google-cloud-dataplex-v1/test/helper.rb +++ b/google-cloud-dataplex-v1/test/helper.rb @@ -18,6 +18,7 @@ require "minitest/autorun" require "minitest/focus" +require "minitest/mock" require "minitest/rg" require "grpc"