From 15b9808337fcc2456a762ba7ef97bf9ce5a147e4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 19 Mar 2026 04:21:34 +0000 Subject: [PATCH 1/2] feat: Add irb as explicit dependency for Ruby 4.0 compatibility PiperOrigin-RevId: 885280435 Source-Link: https://github.com/googleapis/googleapis/commit/f29d22898a2018d4588d9f454262981de32f0686 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fca7136c1c0aa900ca4fa0a4ba14f1aeb29b0bfd Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFwbGV4LXYxLy5Pd2xCb3QueWFtbCIsImgiOiJmY2E3MTM2YzFjMGFhOTAwY2E0ZmEwYTRiYTE0ZjFhZWIyOWIwYmZkIn0= feat: Update minimum Ruby to v3.2 and required dependencies for Ruby v4.0 PiperOrigin-RevId: 883373063 Source-Link: https://github.com/googleapis/googleapis/commit/e1443bf1e54b17b5e1c0f7ff6f09cbdb65e560bf Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ecc70c2922cfc4649a0454bc8d2e1f3a58a9d78 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFwbGV4LXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4ZWNjNzBjMjkyMmNmYzQ2NDlhMDQ1NGJjOGQyZTFmM2E1OGE5ZDc4In0= 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 The DataProductService provides APIs to curate and manage collections of data assets as data products, enabling more organized sharing and usage for specific business cases. MetadataFeeds allow users to monitor metadata changes (CREATE, UPDATE, DELETE) within a specified scope (organization, project, or entry group) and publish them to Pub/Sub. CatalogService now includes a LookupContext API to provide LLM-generated context for resources, and enhanced EntryLink management, including the ability to attach aspects. DataScan operations now support a OneTime trigger for single-run scans, and Data Quality rules support DebugQueries to help investigate rule failures by returning diagnostic values. 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. PiperOrigin-RevId: 883306841 Source-Link: https://github.com/googleapis/googleapis/commit/69ca7ae2e66cd5623cafecc00971ef5397a4b258 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2508201c4104526b07bb52754edde9e038a5d65c Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFwbGV4LXYxLy5Pd2xCb3QueWFtbCIsImgiOiIyNTA4MjAxYzQxMDQ1MjZiMDdiYjUyNzU0ZWRkZTllMDM4YTVkNjVjIn0= --- .../google-cloud-dataplex-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-dataplex-v1/.rubocop.yml | 33 + .../google-cloud-dataplex-v1/.toys.rb | 28 + .../google-cloud-dataplex-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-dataplex-v1/CHANGELOG.md | 2 + .../google-cloud-dataplex-v1/Gemfile | 14 + .../google-cloud-dataplex-v1/LICENSE.md | 201 + .../google-cloud-dataplex-v1/README.md | 154 + .../google-cloud-dataplex-v1/Rakefile | 169 + .../gapic_metadata.json | 724 +++ .../google-cloud-dataplex-v1.gemspec | 30 + .../lib/google-cloud-dataplex-v1.rb | 21 + .../lib/google/cloud/dataplex/v1.rb | 53 + .../google/cloud/dataplex/v1/analyze_pb.rb | 39 + .../cloud/dataplex/v1/bindings_override.rb | 564 ++ .../cloud/dataplex/v1/business_glossary_pb.rb | 52 + .../dataplex/v1/business_glossary_service.rb | 61 + .../v1/business_glossary_service/client.rb | 2002 +++++++ .../business_glossary_service/credentials.rb | 47 + .../business_glossary_service/operations.rb | 841 +++ .../v1/business_glossary_service/paths.rb | 111 + .../v1/business_glossary_service/rest.rb | 59 + .../business_glossary_service/rest/client.rb | 1863 ++++++ .../rest/operations.rb | 954 +++ .../rest/service_stub.rb | 1002 ++++ .../v1/business_glossary_services_pb.rb | 81 + .../google/cloud/dataplex/v1/catalog_pb.rb | 119 + .../cloud/dataplex/v1/catalog_service.rb | 60 + .../dataplex/v1/catalog_service/client.rb | 4475 +++++++++++++++ .../v1/catalog_service/credentials.rb | 50 + .../dataplex/v1/catalog_service/operations.rb | 841 +++ .../dataplex/v1/catalog_service/paths.rb | 220 + .../cloud/dataplex/v1/catalog_service/rest.rb | 58 + .../v1/catalog_service/rest/client.rb | 4182 ++++++++++++++ .../v1/catalog_service/rest/operations.rb | 954 +++ .../v1/catalog_service/rest/service_stub.rb | 2353 ++++++++ .../cloud/dataplex/v1/catalog_services_pb.rb | 127 + .../lib/google/cloud/dataplex/v1/cmek_pb.rb | 40 + .../google/cloud/dataplex/v1/cmek_service.rb | 56 + .../cloud/dataplex/v1/cmek_service/client.rb | 961 ++++ .../dataplex/v1/cmek_service/credentials.rb | 47 + .../dataplex/v1/cmek_service/operations.rb | 841 +++ .../cloud/dataplex/v1/cmek_service/paths.rb | 69 + .../cloud/dataplex/v1/cmek_service/rest.rb | 54 + .../dataplex/v1/cmek_service/rest/client.rb | 892 +++ .../v1/cmek_service/rest/operations.rb | 954 +++ .../v1/cmek_service/rest/service_stub.rb | 388 ++ .../cloud/dataplex/v1/cmek_services_pb.rb | 53 + .../google/cloud/dataplex/v1/content_pb.rb | 25 + .../cloud/dataplex/v1/content_service.rb | 49 + .../dataplex/v1/content_service/client.rb | 395 ++ .../v1/content_service/credentials.rb | 44 + .../cloud/dataplex/v1/content_services_pb.rb | 29 + .../cloud/dataplex/v1/data_discovery_pb.rb | 32 + .../dataplex/v1/data_documentation_pb.rb | 29 + .../cloud/dataplex/v1/data_product_service.rb | 57 + .../v1/data_product_service/client.rb | 1541 +++++ .../v1/data_product_service/credentials.rb | 47 + .../v1/data_product_service/operations.rb | 841 +++ .../dataplex/v1/data_product_service/paths.rb | 90 + .../dataplex/v1/data_product_service/rest.rb | 55 + .../v1/data_product_service/rest/client.rb | 1437 +++++ .../data_product_service/rest/operations.rb | 954 +++ .../data_product_service/rest/service_stub.rb | 695 +++ .../cloud/dataplex/v1/data_products_pb.rb | 48 + .../dataplex/v1/data_products_services_pb.rb | 65 + .../cloud/dataplex/v1/data_profile_pb.rb | 39 + .../cloud/dataplex/v1/data_quality_pb.rb | 56 + .../cloud/dataplex/v1/data_scan_service.rb | 58 + .../dataplex/v1/data_scan_service/client.rb | 1398 +++++ .../v1/data_scan_service/credentials.rb | 47 + .../v1/data_scan_service/operations.rb | 841 +++ .../dataplex/v1/data_scan_service/paths.rb | 163 + .../dataplex/v1/data_scan_service/rest.rb | 56 + .../v1/data_scan_service/rest/client.rb | 1301 +++++ .../v1/data_scan_service/rest/operations.rb | 954 +++ .../v1/data_scan_service/rest/service_stub.rb | 642 +++ .../cloud/dataplex/v1/data_taxonomy_pb.rb | 53 + .../dataplex/v1/data_taxonomy_service.rb | 59 + .../v1/data_taxonomy_service/client.rb | 2060 +++++++ .../v1/data_taxonomy_service/credentials.rb | 47 + .../v1/data_taxonomy_service/operations.rb | 841 +++ .../v1/data_taxonomy_service/paths.rb | 109 + .../dataplex/v1/data_taxonomy_service/rest.rb | 55 + .../v1/data_taxonomy_service/rest/client.rb | 1890 ++++++ .../data_taxonomy_service/rest/operations.rb | 954 +++ .../rest/service_stub.rb | 1003 ++++ .../dataplex/v1/data_taxonomy_services_pb.rb | 77 + .../cloud/dataplex/v1/dataplex_service.rb | 60 + .../dataplex/v1/dataplex_service/client.rb | 3366 +++++++++++ .../v1/dataplex_service/credentials.rb | 47 + .../v1/dataplex_service/operations.rb | 841 +++ .../dataplex/v1/dataplex_service/paths.rb | 157 + .../dataplex/v1/dataplex_service/rest.rb | 58 + .../v1/dataplex_service/rest/client.rb | 3143 ++++++++++ .../v1/dataplex_service/rest/operations.rb | 954 +++ .../v1/dataplex_service/rest/service_stub.rb | 1738 ++++++ .../cloud/dataplex/v1/datascans_common_pb.rb | 24 + .../google/cloud/dataplex/v1/datascans_pb.rb | 58 + .../dataplex/v1/datascans_services_pb.rb | 66 + .../lib/google/cloud/dataplex/v1/logs_pb.rb | 68 + .../google/cloud/dataplex/v1/metadata_pb.rb | 60 + .../cloud/dataplex/v1/metadata_service.rb | 56 + .../dataplex/v1/metadata_service/client.rb | 1370 +++++ .../v1/metadata_service/credentials.rb | 47 + .../dataplex/v1/metadata_service/paths.rb | 102 + .../dataplex/v1/metadata_service/rest.rb | 54 + .../v1/metadata_service/rest/client.rb | 1273 ++++ .../v1/metadata_service/rest/service_stub.rb | 633 ++ .../cloud/dataplex/v1/metadata_services_pb.rb | 62 + .../google/cloud/dataplex/v1/processing_pb.rb | 31 + .../google/cloud/dataplex/v1/resources_pb.rb | 64 + .../lib/google/cloud/dataplex/v1/rest.rb | 45 + .../google/cloud/dataplex/v1/security_pb.rb | 24 + .../google/cloud/dataplex/v1/service_pb.rb | 66 + .../cloud/dataplex/v1/service_services_pb.rb | 104 + .../lib/google/cloud/dataplex/v1/tasks_pb.rb | 41 + .../lib/google/cloud/dataplex/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/dataplex/v1/analyze.rb | 294 + .../cloud/dataplex/v1/business_glossary.rb | 531 ++ .../google/cloud/dataplex/v1/catalog.rb | 2253 ++++++++ .../google/cloud/dataplex/v1/cmek.rb | 216 + .../cloud/dataplex/v1/data_discovery.rb | 222 + .../cloud/dataplex/v1/data_documentation.rb | 124 + .../google/cloud/dataplex/v1/data_products.rb | 520 ++ .../google/cloud/dataplex/v1/data_profile.rb | 340 ++ .../google/cloud/dataplex/v1/data_quality.rb | 690 +++ .../google/cloud/dataplex/v1/data_taxonomy.rb | 567 ++ .../google/cloud/dataplex/v1/datascans.rb | 561 ++ .../cloud/dataplex/v1/datascans_common.rb | 52 + .../google/cloud/dataplex/v1/logs.rb | 964 ++++ .../google/cloud/dataplex/v1/metadata.rb | 741 +++ .../google/cloud/dataplex/v1/processing.rb | 137 + .../google/cloud/dataplex/v1/resources.rb | 858 +++ .../google/cloud/dataplex/v1/security.rb | 61 + .../google/cloud/dataplex/v1/service.rb | 655 +++ .../google/cloud/dataplex/v1/tasks.rb | 452 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-cloud-dataplex-v1/snippets/Gemfile | 32 + .../create_glossary.rb | 54 + .../create_glossary_category.rb | 47 + .../create_glossary_term.rb | 47 + .../delete_glossary.rb | 54 + .../delete_glossary_category.rb | 47 + .../delete_glossary_term.rb | 47 + .../business_glossary_service/get_glossary.rb | 47 + .../get_glossary_category.rb | 47 + .../get_glossary_term.rb | 47 + .../list_glossaries.rb | 51 + .../list_glossary_categories.rb | 51 + .../list_glossary_terms.rb | 51 + .../update_glossary.rb | 54 + .../update_glossary_category.rb | 47 + .../update_glossary_term.rb | 47 + .../catalog_service/cancel_metadata_job.rb | 47 + .../catalog_service/create_aspect_type.rb | 54 + .../snippets/catalog_service/create_entry.rb | 47 + .../catalog_service/create_entry_group.rb | 54 + .../catalog_service/create_entry_link.rb | 47 + .../catalog_service/create_entry_type.rb | 54 + .../catalog_service/create_metadata_feed.rb | 54 + .../catalog_service/create_metadata_job.rb | 54 + .../catalog_service/delete_aspect_type.rb | 54 + .../snippets/catalog_service/delete_entry.rb | 47 + .../catalog_service/delete_entry_group.rb | 54 + .../catalog_service/delete_entry_link.rb | 47 + .../catalog_service/delete_entry_type.rb | 54 + .../catalog_service/delete_metadata_feed.rb | 54 + .../catalog_service/get_aspect_type.rb | 47 + .../snippets/catalog_service/get_entry.rb | 47 + .../catalog_service/get_entry_group.rb | 47 + .../catalog_service/get_entry_link.rb | 47 + .../catalog_service/get_entry_type.rb | 47 + .../catalog_service/get_metadata_feed.rb | 47 + .../catalog_service/get_metadata_job.rb | 47 + .../catalog_service/list_aspect_types.rb | 51 + .../snippets/catalog_service/list_entries.rb | 51 + .../catalog_service/list_entry_groups.rb | 51 + .../catalog_service/list_entry_types.rb | 51 + .../catalog_service/list_metadata_feeds.rb | 51 + .../catalog_service/list_metadata_jobs.rb | 51 + .../catalog_service/lookup_context.rb | 47 + .../snippets/catalog_service/lookup_entry.rb | 47 + .../catalog_service/lookup_entry_links.rb | 51 + .../catalog_service/search_entries.rb | 51 + .../catalog_service/update_aspect_type.rb | 54 + .../snippets/catalog_service/update_entry.rb | 47 + .../catalog_service/update_entry_group.rb | 54 + .../catalog_service/update_entry_link.rb | 47 + .../catalog_service/update_entry_type.rb | 54 + .../catalog_service/update_metadata_feed.rb | 54 + .../cmek_service/create_encryption_config.rb | 54 + .../cmek_service/delete_encryption_config.rb | 54 + .../cmek_service/get_encryption_config.rb | 47 + .../cmek_service/list_encryption_configs.rb | 51 + .../cmek_service/update_encryption_config.rb | 54 + .../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 + .../data_product_service/get_data_asset.rb | 47 + .../data_product_service/get_data_product.rb | 47 + .../data_product_service/list_data_assets.rb | 51 + .../list_data_products.rb | 51 + .../data_product_service/update_data_asset.rb | 54 + .../update_data_product.rb | 54 + .../data_scan_service/create_data_scan.rb | 54 + .../data_scan_service/delete_data_scan.rb | 54 + .../generate_data_quality_rules.rb | 47 + .../data_scan_service/get_data_scan.rb | 47 + .../data_scan_service/get_data_scan_job.rb | 47 + .../data_scan_service/list_data_scan_jobs.rb | 51 + .../data_scan_service/list_data_scans.rb | 51 + .../data_scan_service/run_data_scan.rb | 47 + .../data_scan_service/update_data_scan.rb | 54 + .../create_data_attribute.rb | 54 + .../create_data_attribute_binding.rb | 54 + .../create_data_taxonomy.rb | 54 + .../delete_data_attribute.rb | 54 + .../delete_data_attribute_binding.rb | 54 + .../delete_data_taxonomy.rb | 54 + .../get_data_attribute.rb | 47 + .../get_data_attribute_binding.rb | 47 + .../get_data_taxonomy.rb | 47 + .../list_data_attribute_bindings.rb | 51 + .../list_data_attributes.rb | 51 + .../list_data_taxonomies.rb | 51 + .../update_data_attribute.rb | 54 + .../update_data_attribute_binding.rb | 54 + .../update_data_taxonomy.rb | 54 + .../snippets/dataplex_service/cancel_job.rb | 47 + .../snippets/dataplex_service/create_asset.rb | 54 + .../snippets/dataplex_service/create_lake.rb | 54 + .../snippets/dataplex_service/create_task.rb | 54 + .../snippets/dataplex_service/create_zone.rb | 54 + .../snippets/dataplex_service/delete_asset.rb | 54 + .../snippets/dataplex_service/delete_lake.rb | 54 + .../snippets/dataplex_service/delete_task.rb | 54 + .../snippets/dataplex_service/delete_zone.rb | 54 + .../snippets/dataplex_service/get_asset.rb | 47 + .../snippets/dataplex_service/get_job.rb | 47 + .../snippets/dataplex_service/get_lake.rb | 47 + .../snippets/dataplex_service/get_task.rb | 47 + .../snippets/dataplex_service/get_zone.rb | 47 + .../dataplex_service/list_asset_actions.rb | 51 + .../snippets/dataplex_service/list_assets.rb | 51 + .../snippets/dataplex_service/list_jobs.rb | 51 + .../dataplex_service/list_lake_actions.rb | 51 + .../snippets/dataplex_service/list_lakes.rb | 51 + .../snippets/dataplex_service/list_tasks.rb | 51 + .../dataplex_service/list_zone_actions.rb | 51 + .../snippets/dataplex_service/list_zones.rb | 51 + .../snippets/dataplex_service/run_task.rb | 47 + .../snippets/dataplex_service/update_asset.rb | 54 + .../snippets/dataplex_service/update_lake.rb | 54 + .../snippets/dataplex_service/update_task.rb | 54 + .../snippets/dataplex_service/update_zone.rb | 54 + .../metadata_service/create_entity.rb | 47 + .../metadata_service/create_partition.rb | 47 + .../metadata_service/delete_entity.rb | 47 + .../metadata_service/delete_partition.rb | 47 + .../snippets/metadata_service/get_entity.rb | 47 + .../metadata_service/get_partition.rb | 47 + .../metadata_service/list_entities.rb | 51 + .../metadata_service/list_partitions.rb | 51 + .../metadata_service/update_entity.rb | 47 + ...pet_metadata_google.cloud.dataplex.v1.json | 5095 +++++++++++++++++ ...siness_glossary_service_operations_test.rb | 400 ++ .../business_glossary_service_paths_test.rb | 91 + .../v1/business_glossary_service_rest_test.rb | 933 +++ .../v1/business_glossary_service_test.rb | 1066 ++++ .../v1/catalog_service_operations_test.rb | 400 ++ .../dataplex/v1/catalog_service_paths_test.rb | 163 + .../dataplex/v1/catalog_service_rest_test.rb | 2176 +++++++ .../cloud/dataplex/v1/catalog_service_test.rb | 2527 ++++++++ .../v1/cmek_service_operations_test.rb | 400 ++ .../dataplex/v1/cmek_service_paths_test.rb | 67 + .../dataplex/v1/cmek_service_rest_test.rb | 377 ++ .../cloud/dataplex/v1/cmek_service_test.rb | 444 ++ .../cloud/dataplex/v1/content_service_test.rb | 104 + .../data_product_service_operations_test.rb | 400 ++ .../v1/data_product_service_paths_test.rb | 79 + .../v1/data_product_service_rest_test.rb | 661 +++ .../dataplex/v1/data_product_service_test.rb | 782 +++ .../v1/data_scan_service_operations_test.rb | 400 ++ .../v1/data_scan_service_paths_test.rb | 127 + .../v1/data_scan_service_rest_test.rb | 600 ++ .../dataplex/v1/data_scan_service_test.rb | 695 +++ .../data_taxonomy_service_operations_test.rb | 400 ++ .../v1/data_taxonomy_service_paths_test.rb | 91 + .../v1/data_taxonomy_service_rest_test.rb | 939 +++ .../dataplex/v1/data_taxonomy_service_test.rb | 1108 ++++ .../v1/dataplex_service_operations_test.rb | 400 ++ .../v1/dataplex_service_paths_test.rb | 115 + .../dataplex/v1/dataplex_service_rest_test.rb | 1603 ++++++ .../dataplex/v1/dataplex_service_test.rb | 1876 ++++++ .../v1/metadata_service_paths_test.rb | 79 + .../dataplex/v1/metadata_service_rest_test.rb | 600 ++ .../dataplex/v1/metadata_service_test.rb | 666 +++ .../google-cloud-dataplex-v1/test/helper.rb | 26 + 316 files changed, 105439 insertions(+) create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/README.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/business_glossary.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/cmek.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_discovery.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_products.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_category.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_term.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_category.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_term.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_category.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_term.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossaries.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_categories.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_terms.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_category.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_term.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/cancel_metadata_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_link.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_link.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_link.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_jobs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/create_encryption_config.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/delete_encryption_config.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/get_encryption_config.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/list_encryption_configs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/update_encryption_config.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/create_data_product.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_product.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_product.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/update_data_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/update_data_product.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb create mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.gitignore b/owl-bot-staging/google-cloud-dataplex-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json new file mode 100644 index 000000000000..70ddbcadde04 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "dataplex.googleapis.com", + "api_shortname": "dataplex", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest", + "distribution_name": "google-cloud-dataplex-v1", + "is_cloud": true, + "language": "ruby", + "name": "dataplex", + "name_pretty": "Dataplex V1 API", + "product_documentation": "https://cloud.google.com/dataplex/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/dataplex/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml b/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml new file mode 100644 index 000000000000..029e6a990334 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-dataplex-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-dataplex-v1.rb" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb b/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb @@ -0,0 +1,28 @@ +# 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! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.yardopts b/owl-bot-staging/google-cloud-dataplex-v1/.yardopts new file mode 100644 index 000000000000..610ce5201635 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Dataplex V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1c60fe75f8a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-dataplex-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-dataplex-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/dataplex/v1" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/dataplex/v1" + +::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-dataplex-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/dataplex/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +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/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md b/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/README.md b/owl-bot-staging/google-cloud-dataplex-v1/README.md new file mode 100644 index 000000000000..e2ffd93371eb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Dataplex V1 API + +A unified, intelligent governance solution for data and AI assets. + +Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Dataplex V1 API. Most users should consider using +the main client gem, +[google-cloud-dataplex](https://rubygems.org/gems/google-cloud-dataplex). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-dataplex-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/dataplex.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/dataplex/v1" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new +request = ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new # (request fields as keyword arguments...) +response = client.create_lake request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/dataplex/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/dataplex/v1" +require "logger" + +client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-dataplex`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-dataplex-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-dataplex`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-dataplex-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Rakefile b/owl-bot-staging/google-cloud-dataplex-v1/Rakefile new file mode 100644 index 000000000000..4ff988d7752e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/Rakefile @@ -0,0 +1,169 @@ +# 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 "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-dataplex-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/dataplex/v1/dataplex_service/credentials" + ::Google::Cloud::Dataplex::V1::DataplexService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-dataplex-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-dataplex-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-dataplex-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-dataplex-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-dataplex-v1" + header "google-cloud-dataplex-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-dataplex-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-dataplex-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-dataplex-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-dataplex-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json new file mode 100644 index 000000000000..cbf3c56fe31b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json @@ -0,0 +1,724 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.dataplex.v1", + "libraryPackage": "::Google::Cloud::Dataplex::V1", + "services": { + "DataplexService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataplexService::Client", + "rpcs": { + "CreateLake": { + "methods": [ + "create_lake" + ] + }, + "UpdateLake": { + "methods": [ + "update_lake" + ] + }, + "DeleteLake": { + "methods": [ + "delete_lake" + ] + }, + "ListLakes": { + "methods": [ + "list_lakes" + ] + }, + "GetLake": { + "methods": [ + "get_lake" + ] + }, + "ListLakeActions": { + "methods": [ + "list_lake_actions" + ] + }, + "CreateZone": { + "methods": [ + "create_zone" + ] + }, + "UpdateZone": { + "methods": [ + "update_zone" + ] + }, + "DeleteZone": { + "methods": [ + "delete_zone" + ] + }, + "ListZones": { + "methods": [ + "list_zones" + ] + }, + "GetZone": { + "methods": [ + "get_zone" + ] + }, + "ListZoneActions": { + "methods": [ + "list_zone_actions" + ] + }, + "CreateAsset": { + "methods": [ + "create_asset" + ] + }, + "UpdateAsset": { + "methods": [ + "update_asset" + ] + }, + "DeleteAsset": { + "methods": [ + "delete_asset" + ] + }, + "ListAssets": { + "methods": [ + "list_assets" + ] + }, + "GetAsset": { + "methods": [ + "get_asset" + ] + }, + "ListAssetActions": { + "methods": [ + "list_asset_actions" + ] + }, + "CreateTask": { + "methods": [ + "create_task" + ] + }, + "UpdateTask": { + "methods": [ + "update_task" + ] + }, + "DeleteTask": { + "methods": [ + "delete_task" + ] + }, + "ListTasks": { + "methods": [ + "list_tasks" + ] + }, + "GetTask": { + "methods": [ + "get_task" + ] + }, + "ListJobs": { + "methods": [ + "list_jobs" + ] + }, + "RunTask": { + "methods": [ + "run_task" + ] + }, + "GetJob": { + "methods": [ + "get_job" + ] + }, + "CancelJob": { + "methods": [ + "cancel_job" + ] + } + } + } + } + }, + "BusinessGlossaryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client", + "rpcs": { + "CreateGlossary": { + "methods": [ + "create_glossary" + ] + }, + "UpdateGlossary": { + "methods": [ + "update_glossary" + ] + }, + "DeleteGlossary": { + "methods": [ + "delete_glossary" + ] + }, + "GetGlossary": { + "methods": [ + "get_glossary" + ] + }, + "ListGlossaries": { + "methods": [ + "list_glossaries" + ] + }, + "CreateGlossaryCategory": { + "methods": [ + "create_glossary_category" + ] + }, + "UpdateGlossaryCategory": { + "methods": [ + "update_glossary_category" + ] + }, + "DeleteGlossaryCategory": { + "methods": [ + "delete_glossary_category" + ] + }, + "GetGlossaryCategory": { + "methods": [ + "get_glossary_category" + ] + }, + "ListGlossaryCategories": { + "methods": [ + "list_glossary_categories" + ] + }, + "CreateGlossaryTerm": { + "methods": [ + "create_glossary_term" + ] + }, + "UpdateGlossaryTerm": { + "methods": [ + "update_glossary_term" + ] + }, + "DeleteGlossaryTerm": { + "methods": [ + "delete_glossary_term" + ] + }, + "GetGlossaryTerm": { + "methods": [ + "get_glossary_term" + ] + }, + "ListGlossaryTerms": { + "methods": [ + "list_glossary_terms" + ] + } + } + } + } + }, + "CatalogService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::CatalogService::Client", + "rpcs": { + "CreateEntryType": { + "methods": [ + "create_entry_type" + ] + }, + "UpdateEntryType": { + "methods": [ + "update_entry_type" + ] + }, + "DeleteEntryType": { + "methods": [ + "delete_entry_type" + ] + }, + "ListEntryTypes": { + "methods": [ + "list_entry_types" + ] + }, + "GetEntryType": { + "methods": [ + "get_entry_type" + ] + }, + "CreateAspectType": { + "methods": [ + "create_aspect_type" + ] + }, + "UpdateAspectType": { + "methods": [ + "update_aspect_type" + ] + }, + "DeleteAspectType": { + "methods": [ + "delete_aspect_type" + ] + }, + "ListAspectTypes": { + "methods": [ + "list_aspect_types" + ] + }, + "GetAspectType": { + "methods": [ + "get_aspect_type" + ] + }, + "CreateEntryGroup": { + "methods": [ + "create_entry_group" + ] + }, + "UpdateEntryGroup": { + "methods": [ + "update_entry_group" + ] + }, + "DeleteEntryGroup": { + "methods": [ + "delete_entry_group" + ] + }, + "ListEntryGroups": { + "methods": [ + "list_entry_groups" + ] + }, + "GetEntryGroup": { + "methods": [ + "get_entry_group" + ] + }, + "CreateEntry": { + "methods": [ + "create_entry" + ] + }, + "UpdateEntry": { + "methods": [ + "update_entry" + ] + }, + "DeleteEntry": { + "methods": [ + "delete_entry" + ] + }, + "ListEntries": { + "methods": [ + "list_entries" + ] + }, + "GetEntry": { + "methods": [ + "get_entry" + ] + }, + "LookupEntry": { + "methods": [ + "lookup_entry" + ] + }, + "SearchEntries": { + "methods": [ + "search_entries" + ] + }, + "CreateMetadataJob": { + "methods": [ + "create_metadata_job" + ] + }, + "GetMetadataJob": { + "methods": [ + "get_metadata_job" + ] + }, + "ListMetadataJobs": { + "methods": [ + "list_metadata_jobs" + ] + }, + "CancelMetadataJob": { + "methods": [ + "cancel_metadata_job" + ] + }, + "CreateEntryLink": { + "methods": [ + "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" + ] + } + } + } + } + }, + "CmekService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::CmekService::Client", + "rpcs": { + "CreateEncryptionConfig": { + "methods": [ + "create_encryption_config" + ] + }, + "UpdateEncryptionConfig": { + "methods": [ + "update_encryption_config" + ] + }, + "DeleteEncryptionConfig": { + "methods": [ + "delete_encryption_config" + ] + }, + "ListEncryptionConfigs": { + "methods": [ + "list_encryption_configs" + ] + }, + "GetEncryptionConfig": { + "methods": [ + "get_encryption_config" + ] + } + } + } + } + }, + "ContentService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::ContentService::Client", + "rpcs": {} + } + } + }, + "DataProductService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataProductService::Client", + "rpcs": { + "CreateDataProduct": { + "methods": [ + "create_data_product" + ] + }, + "DeleteDataProduct": { + "methods": [ + "delete_data_product" + ] + }, + "GetDataProduct": { + "methods": [ + "get_data_product" + ] + }, + "ListDataProducts": { + "methods": [ + "list_data_products" + ] + }, + "UpdateDataProduct": { + "methods": [ + "update_data_product" + ] + }, + "CreateDataAsset": { + "methods": [ + "create_data_asset" + ] + }, + "UpdateDataAsset": { + "methods": [ + "update_data_asset" + ] + }, + "DeleteDataAsset": { + "methods": [ + "delete_data_asset" + ] + }, + "GetDataAsset": { + "methods": [ + "get_data_asset" + ] + }, + "ListDataAssets": { + "methods": [ + "list_data_assets" + ] + } + } + } + } + }, + "DataTaxonomyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client", + "rpcs": { + "CreateDataTaxonomy": { + "methods": [ + "create_data_taxonomy" + ] + }, + "UpdateDataTaxonomy": { + "methods": [ + "update_data_taxonomy" + ] + }, + "DeleteDataTaxonomy": { + "methods": [ + "delete_data_taxonomy" + ] + }, + "ListDataTaxonomies": { + "methods": [ + "list_data_taxonomies" + ] + }, + "GetDataTaxonomy": { + "methods": [ + "get_data_taxonomy" + ] + }, + "CreateDataAttributeBinding": { + "methods": [ + "create_data_attribute_binding" + ] + }, + "UpdateDataAttributeBinding": { + "methods": [ + "update_data_attribute_binding" + ] + }, + "DeleteDataAttributeBinding": { + "methods": [ + "delete_data_attribute_binding" + ] + }, + "ListDataAttributeBindings": { + "methods": [ + "list_data_attribute_bindings" + ] + }, + "GetDataAttributeBinding": { + "methods": [ + "get_data_attribute_binding" + ] + }, + "CreateDataAttribute": { + "methods": [ + "create_data_attribute" + ] + }, + "UpdateDataAttribute": { + "methods": [ + "update_data_attribute" + ] + }, + "DeleteDataAttribute": { + "methods": [ + "delete_data_attribute" + ] + }, + "ListDataAttributes": { + "methods": [ + "list_data_attributes" + ] + }, + "GetDataAttribute": { + "methods": [ + "get_data_attribute" + ] + } + } + } + } + }, + "DataScanService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::DataScanService::Client", + "rpcs": { + "CreateDataScan": { + "methods": [ + "create_data_scan" + ] + }, + "UpdateDataScan": { + "methods": [ + "update_data_scan" + ] + }, + "DeleteDataScan": { + "methods": [ + "delete_data_scan" + ] + }, + "GetDataScan": { + "methods": [ + "get_data_scan" + ] + }, + "ListDataScans": { + "methods": [ + "list_data_scans" + ] + }, + "RunDataScan": { + "methods": [ + "run_data_scan" + ] + }, + "GetDataScanJob": { + "methods": [ + "get_data_scan_job" + ] + }, + "ListDataScanJobs": { + "methods": [ + "list_data_scan_jobs" + ] + }, + "GenerateDataQualityRules": { + "methods": [ + "generate_data_quality_rules" + ] + } + } + } + } + }, + "MetadataService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Dataplex::V1::MetadataService::Client", + "rpcs": { + "CreateEntity": { + "methods": [ + "create_entity" + ] + }, + "UpdateEntity": { + "methods": [ + "update_entity" + ] + }, + "DeleteEntity": { + "methods": [ + "delete_entity" + ] + }, + "GetEntity": { + "methods": [ + "get_entity" + ] + }, + "ListEntities": { + "methods": [ + "list_entities" + ] + }, + "CreatePartition": { + "methods": [ + "create_partition" + ] + }, + "DeletePartition": { + "methods": [ + "delete_partition" + ] + }, + "GetPartition": { + "methods": [ + "get_partition" + ] + }, + "ListPartitions": { + "methods": [ + "list_partitions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec b/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec new file mode 100644 index 000000000000..9471bd20f65e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/dataplex/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-dataplex-v1" + gem.version = Google::Cloud::Dataplex::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details." + gem.summary = "A unified, intelligent governance solution for data and AI assets." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb new file mode 100644 index 000000000000..1b46c3bbc688 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 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! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/dataplex/v1" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb new file mode 100644 index 000000000000..fe5cff31a148 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb @@ -0,0 +1,53 @@ +# 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 "google/cloud/dataplex/v1/dataplex_service" +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" +require "google/cloud/dataplex/v1/version" + +module Google + module Cloud + module Dataplex + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/dataplex/v1" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/dataplex/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb new file mode 100644 index 000000000000..6d49a5c634de --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/analyze.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/analyze.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\r\n\x0b\x45nvironment\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x06 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12Z\n\x13infrastructure_spec\x18\x64 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Environment.InfrastructureSpecB\x03\xe0\x41\x02\x12L\n\x0csession_spec\x18\x65 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.SessionSpecB\x03\xe0\x41\x01\x12P\n\x0esession_status\x18\x66 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.Environment.SessionStatusB\x03\xe0\x41\x03\x12H\n\tendpoints\x18\xc8\x01 \x01(\x0b\x32/.google.cloud.dataplex.v1.Environment.EndpointsB\x03\xe0\x41\x03\x1a\xe5\x04\n\x12InfrastructureSpec\x12\x61\n\x07\x63ompute\x18\x32 \x01(\x0b\x32I.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResourcesB\x03\xe0\x41\x01H\x00\x12`\n\x08os_image\x18\x64 \x01(\x0b\x32G.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntimeB\x03\xe0\x41\x02H\x01\x1a\x63\n\x10\x43omputeResources\x12\x19\n\x0c\x64isk_size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0emax_node_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x8c\x02\n\x0eOsImageRuntime\x12\x1a\n\rimage_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0ejava_libraries\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\tresourcesB\t\n\x07runtime\x1aj\n\x0bSessionSpec\x12\x39\n\x11max_idle_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12 \n\x13\x65nable_fast_startup\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a$\n\rSessionStatus\x12\x13\n\x06\x61\x63tive\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x35\n\tEndpoints\x12\x16\n\tnotebooks\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03sql\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:y\xea\x41v\n#dataplex.googleapis.com/Environment\x12Oprojects/{project}/locations/{location}/lakes/{lake}/environments/{environment}\"\xa6\x07\n\x07\x43ontent\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x06 \x03(\x0b\x32-.google.cloud.dataplex.v1.Content.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\tdata_text\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12\x41\n\nsql_script\x18\x64 \x01(\x0b\x32+.google.cloud.dataplex.v1.Content.SqlScriptH\x01\x12>\n\x08notebook\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Content.NotebookH\x01\x1a\x91\x01\n\tSqlScript\x12L\n\x06\x65ngine\x18\x01 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Content.SqlScript.QueryEngineB\x03\xe0\x41\x02\"6\n\x0bQueryEngine\x12\x1c\n\x18QUERY_ENGINE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x02\x1a\x93\x01\n\x08Notebook\x12O\n\x0bkernel_type\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Content.Notebook.KernelTypeB\x03\xe0\x41\x02\"6\n\nKernelType\x12\x1b\n\x17KERNEL_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PYTHON3\x10\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:l\xea\x41i\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x46projects/{project}/locations/{location}/lakes/{lake}/content/{content}B\x06\n\x04\x64\x61taB\t\n\x07\x63ontent\"\xcd\x02\n\x07Session\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\x05state\x18\x04 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03:\x89\x01\xea\x41\x85\x01\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x62projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}Bh\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x41nalyzeProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment").msgclass + Environment::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec").msgclass + Environment::InfrastructureSpec::ComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources").msgclass + Environment::InfrastructureSpec::OsImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime").msgclass + Environment::SessionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionSpec").msgclass + Environment::SessionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionStatus").msgclass + Environment::Endpoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.Endpoints").msgclass + Content = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content").msgclass + Content::SqlScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript").msgclass + Content::SqlScript::QueryEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript.QueryEngine").enummodule + Content::Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook").msgclass + Content::Notebook::KernelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook.KernelType").enummodule + Session = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Session").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb new file mode 100644 index 000000000000..06c65ac5d59f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb @@ -0,0 +1,564 @@ +# 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/rest" + +module Google + module Cloud + module Dataplex + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/dataplex/v1/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/changeRequests/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/changeRequests/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/changeRequests/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb new file mode 100644 index 000000000000..59ae9aa66345 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/business_glossary.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 = "\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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + Glossary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Glossary").msgclass + GlossaryCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GlossaryCategory").msgclass + GlossaryTerm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GlossaryTerm").msgclass + CreateGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateGlossaryRequest").msgclass + UpdateGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateGlossaryRequest").msgclass + DeleteGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteGlossaryRequest").msgclass + GetGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetGlossaryRequest").msgclass + ListGlossariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossariesRequest").msgclass + ListGlossariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossariesResponse").msgclass + CreateGlossaryCategoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateGlossaryCategoryRequest").msgclass + UpdateGlossaryCategoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateGlossaryCategoryRequest").msgclass + DeleteGlossaryCategoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteGlossaryCategoryRequest").msgclass + GetGlossaryCategoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetGlossaryCategoryRequest").msgclass + ListGlossaryCategoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossaryCategoriesRequest").msgclass + ListGlossaryCategoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossaryCategoriesResponse").msgclass + CreateGlossaryTermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateGlossaryTermRequest").msgclass + UpdateGlossaryTermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateGlossaryTermRequest").msgclass + DeleteGlossaryTermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteGlossaryTermRequest").msgclass + GetGlossaryTermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetGlossaryTermRequest").msgclass + ListGlossaryTermsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossaryTermsRequest").msgclass + ListGlossaryTermsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossaryTermsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service.rb new file mode 100644 index 000000000000..fcb2e4dd0971 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service.rb @@ -0,0 +1,61 @@ +# 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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/business_glossary_service/credentials" +require "google/cloud/dataplex/v1/business_glossary_service/paths" +require "google/cloud/dataplex/v1/business_glossary_service/operations" +require "google/cloud/dataplex/v1/business_glossary_service/client" +require "google/cloud/dataplex/v1/business_glossary_service/rest" + +module Google + module Cloud + module Dataplex + module V1 + ## + # BusinessGlossaryService provides APIs for managing business glossary + # resources for enterprise customers. + # The resources currently supported in Business Glossary are: + # 1. Glossary + # 2. GlossaryCategory + # 3. GlossaryTerm + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/business_glossary_service" + # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/business_glossary_service/rest" + # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + module BusinessGlossaryService + end + end + end + end +end + +helper_path = ::File.join __dir__, "business_glossary_service", "helpers.rb" +require "google/cloud/dataplex/v1/business_glossary_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb new file mode 100644 index 000000000000..183b4fa27724 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb @@ -0,0 +1,2002 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/business_glossary_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module BusinessGlossaryService + ## + # Client for the BusinessGlossaryService service. + # + # BusinessGlossaryService provides APIs for managing business glossary + # resources for enterprise customers. + # The resources currently supported in Business Glossary are: + # 1. Glossary + # 2. GlossaryCategory + # 3. GlossaryTerm + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_glossary_service_stub + + ## + # Configure the BusinessGlossaryService Client class. + # + # See {::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessGlossaryService clients + # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessGlossaryService 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::BusinessGlossaryService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_glossary_service_stub.universe_domain + end + + ## + # Create a new BusinessGlossaryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessGlossaryService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/business_glossary_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @business_glossary_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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, + logger: @config.logger + ) + + @business_glossary_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @business_glossary_service_stub.endpoint + config.universe_domain = @business_glossary_service_stub.universe_domain + config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @business_glossary_service_stub.endpoint + config.universe_domain = @business_glossary_service_stub.universe_domain + config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @business_glossary_service_stub.logger + end + + # Service calls + + ## + # Creates a new Glossary resource. + # + # @overload create_glossary(request, options = nil) + # Pass arguments to `create_glossary` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary(parent: nil, glossary_id: nil, glossary: nil, validate_only: nil) + # Pass arguments to `create_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Glossary will be created. + # Format: projects/\\{project_id_or_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param glossary_id [::String] + # Required. Glossary ID: Glossary identifier. + # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash] + # Required. The Glossary to create. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually creating the Glossary. + # Default: 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::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new + # + # # Call the create_glossary method. + # result = client.create_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest + + # Converts hash and nil to 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_glossary.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_glossary.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :create_glossary, 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 Glossary resource. + # + # @overload update_glossary(request, options = nil) + # Pass arguments to `update_glossary` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary(glossary: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash] + # Required. The Glossary to update. + # The Glossary's `name` field is used to identify the Glossary to update. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually updating the Glossary. + # Default: 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::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new + # + # # Call the update_glossary method. + # result = client.update_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest + + # Converts hash and nil to 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_glossary.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.glossary&.name + header_params["glossary.name"] = request.glossary.name + end + + request_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_glossary.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :update_glossary, 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 Glossary resource. All the categories and terms within the + # Glossary must be deleted before the Glossary can be deleted. + # + # @overload delete_glossary(request, options = nil) + # Pass arguments to `delete_glossary` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary(name: nil, etag: nil) + # Pass arguments to `delete_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Glossary to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # @param etag [::String] + # Optional. The etag of the Glossary. + # 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. + # + # @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::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new + # + # # Call the delete_glossary method. + # result = client.delete_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest + + # Converts hash and nil to 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_glossary.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_glossary.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :delete_glossary, 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 Glossary resource. + # + # @overload get_glossary(request, options = nil) + # Pass arguments to `get_glossary` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary(name: nil) + # Pass arguments to `get_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Glossary to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Glossary] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Glossary] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetGlossaryRequest.new + # + # # Call the get_glossary method. + # result = client.get_glossary request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Glossary. + # p result + # + def get_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryRequest + + # Converts hash and nil to 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_glossary.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_glossary.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :get_glossary, 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 Glossary resources in a project and location. + # + # @overload list_glossaries(request, options = nil) + # Pass arguments to `list_glossaries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListGlossariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListGlossariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_glossaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which has this collection of Glossaries. + # Format: projects/\\{project_id_or_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. The maximum number of Glossaries to return. The service may + # return fewer than this value. If unspecified, at most 50 Glossaries 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 `ListGlossaries` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListGlossaries` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. Filter expression that filters Glossaries listed in the response. + # Filters on proto fields of Glossary are supported. + # Examples of using a filter are: + # - `display_name="my-glossary"` + # - `categoryCount=1` + # - `termCount=0` + # @param order_by [::String] + # Optional. Order by expression that orders Glossaries listed in the + # response. Order by fields are: `name` or `create_time` for the result. If + # not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListGlossariesRequest.new + # + # # Call the list_glossaries method. + # result = client.list_glossaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Glossary. + # p item + # end + # + def list_glossaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossariesRequest + + # Converts hash and nil to 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_glossaries.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_glossaries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_glossaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :list_glossaries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossaries, 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 + + ## + # Creates a new GlossaryCategory resource. + # + # @overload create_glossary_category(request, options = nil) + # Pass arguments to `create_glossary_category` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_category(parent: nil, category_id: nil, category: nil) + # Pass arguments to `create_glossary_category` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryCategory will be created. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # where `locationId` refers to a Google Cloud region. + # @param category_id [::String] + # Required. GlossaryCategory identifier. + # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash] + # Required. The GlossaryCategory to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new + # + # # Call the create_glossary_category method. + # result = client.create_glossary_category request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. + # p result + # + def create_glossary_category request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest + + # Converts hash and nil to 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_glossary_category.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_glossary_category.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_glossary_category.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :create_glossary_category, 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 + + ## + # Updates a GlossaryCategory resource. + # + # @overload update_glossary_category(request, options = nil) + # Pass arguments to `update_glossary_category` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_category(category: nil, update_mask: nil) + # Pass arguments to `update_glossary_category` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash] + # Required. The GlossaryCategory to update. + # The GlossaryCategory's `name` field is used to identify the + # GlossaryCategory to update. Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new + # + # # Call the update_glossary_category method. + # result = client.update_glossary_category request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. + # p result + # + def update_glossary_category request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest + + # Converts hash and nil to 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_glossary_category.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.category&.name + header_params["category.name"] = request.category.name + end + + request_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_glossary_category.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_glossary_category.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :update_glossary_category, 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 a GlossaryCategory resource. All the GlossaryCategories and + # GlossaryTerms nested directly under the specified GlossaryCategory will be + # moved one level up to the parent in the hierarchy. + # + # @overload delete_glossary_category(request, options = nil) + # Pass arguments to `delete_glossary_category` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_category(name: nil) + # Pass arguments to `delete_glossary_category` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryCategory to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new + # + # # Call the delete_glossary_category method. + # result = client.delete_glossary_category request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_glossary_category request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest + + # Converts hash and nil to 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_glossary_category.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_glossary_category.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_glossary_category.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :delete_glossary_category, 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 a GlossaryCategory resource. + # + # @overload get_glossary_category(request, options = nil) + # Pass arguments to `get_glossary_category` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_category(name: nil) + # Pass arguments to `get_glossary_category` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryCategory to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new + # + # # Call the get_glossary_category method. + # result = client.get_glossary_category request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. + # p result + # + def get_glossary_category request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest + + # Converts hash and nil to 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_glossary_category.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_glossary_category.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_glossary_category.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :get_glossary_category, 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 GlossaryCategory resources in a Glossary. + # + # @overload list_glossary_categories(request, options = nil) + # Pass arguments to `list_glossary_categories` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_categories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_glossary_categories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which has this collection of GlossaryCategories. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # Location is the Google Cloud region. + # @param page_size [::Integer] + # Optional. The maximum number of GlossaryCategories to return. The service + # may return fewer than this value. If unspecified, at most 50 + # GlossaryCategories 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 `ListGlossaryCategories` + # call. Provide this to retrieve the subsequent page. When paginating, all + # other parameters provided to `ListGlossaryCategories` must match the call + # that provided the page token. + # @param filter [::String] + # Optional. Filter expression that filters GlossaryCategories listed in the + # response. Filters are supported on the following fields: + # - immediate_parent + # + # Examples of using a filter are: + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` + # + # This will only return the GlossaryCategories that are directly nested + # under the specified parent. + # @param order_by [::String] + # Optional. Order by expression that orders GlossaryCategories listed in the + # response. Order by fields are: `name` or `create_time` for the result. If + # not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.new + # + # # Call the list_glossary_categories method. + # result = client.list_glossary_categories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryCategory. + # p item + # end + # + def list_glossary_categories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest + + # Converts hash and nil to 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_glossary_categories.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_glossary_categories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_glossary_categories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :list_glossary_categories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_categories, 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 + + ## + # Creates a new GlossaryTerm resource. + # + # @overload create_glossary_term(request, options = nil) + # Pass arguments to `create_glossary_term` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_term(parent: nil, term_id: nil, term: nil) + # Pass arguments to `create_glossary_term` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the GlossaryTerm will be created. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # where `location_id` refers to a Google Cloud region. + # @param term_id [::String] + # Required. GlossaryTerm identifier. + # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash] + # Required. The GlossaryTerm to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new + # + # # Call the create_glossary_term method. + # result = client.create_glossary_term request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. + # p result + # + def create_glossary_term request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest + + # Converts hash and nil to 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_glossary_term.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_glossary_term.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_glossary_term.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :create_glossary_term, 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 + + ## + # Updates a GlossaryTerm resource. + # + # @overload update_glossary_term(request, options = nil) + # Pass arguments to `update_glossary_term` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_term(term: nil, update_mask: nil) + # Pass arguments to `update_glossary_term` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash] + # Required. The GlossaryTerm to update. + # The GlossaryTerm's `name` field is used to identify the GlossaryTerm to + # update. Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new + # + # # Call the update_glossary_term method. + # result = client.update_glossary_term request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. + # p result + # + def update_glossary_term request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest + + # Converts hash and nil to 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_glossary_term.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.term&.name + header_params["term.name"] = request.term.name + end + + request_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_glossary_term.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_glossary_term.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :update_glossary_term, 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 a GlossaryTerm resource. + # + # @overload delete_glossary_term(request, options = nil) + # Pass arguments to `delete_glossary_term` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_term(name: nil) + # Pass arguments to `delete_glossary_term` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryTerm to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new + # + # # Call the delete_glossary_term method. + # result = client.delete_glossary_term request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_glossary_term request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest + + # Converts hash and nil to 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_glossary_term.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_glossary_term.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_glossary_term.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :delete_glossary_term, 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 a GlossaryTerm resource. + # + # @overload get_glossary_term(request, options = nil) + # Pass arguments to `get_glossary_term` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_term(name: nil) + # Pass arguments to `get_glossary_term` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryTerm to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new + # + # # Call the get_glossary_term method. + # result = client.get_glossary_term request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. + # p result + # + def get_glossary_term request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest + + # Converts hash and nil to 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_glossary_term.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_glossary_term.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_glossary_term.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :get_glossary_term, 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 GlossaryTerm resources in a Glossary. + # + # @overload list_glossary_terms(request, options = nil) + # Pass arguments to `list_glossary_terms` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_terms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_glossary_terms` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which has this collection of GlossaryTerms. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. The maximum number of GlossaryTerms to return. The service may + # return fewer than this value. If unspecified, at most 50 GlossaryTerms 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 `ListGlossaryTerms` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListGlossaryTerms` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. Filter expression that filters GlossaryTerms listed in the + # response. Filters are supported on the following fields: + # - immediate_parent + # + # Examples of using a filter are: + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` + # + # This will only return the GlossaryTerms that are directly nested under the + # specified parent. + # @param order_by [::String] + # Optional. Order by expression that orders GlossaryTerms listed in the + # response. Order by fields are: `name` or `create_time` for the result. If + # not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.new + # + # # Call the list_glossary_terms method. + # result = client.list_glossary_terms request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryTerm. + # p item + # end + # + def list_glossary_terms request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest + + # Converts hash and nil to 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_glossary_terms.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_glossary_terms.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_glossary_terms.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.call_rpc :list_glossary_terms, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_terms, 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 BusinessGlossaryService API. + # + # This class represents the configuration for BusinessGlossaryService, + # 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::BusinessGlossaryService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_glossary to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_glossary.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_glossary.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::Cloud::Dataplex::V1::BusinessGlossaryService::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 BusinessGlossaryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary + ## + # RPC-specific configuration for `update_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary + ## + # RPC-specific configuration for `delete_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary + ## + # RPC-specific configuration for `get_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary + ## + # RPC-specific configuration for `list_glossaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossaries + ## + # RPC-specific configuration for `create_glossary_category` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary_category + ## + # RPC-specific configuration for `update_glossary_category` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary_category + ## + # RPC-specific configuration for `delete_glossary_category` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary_category + ## + # RPC-specific configuration for `get_glossary_category` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary_category + ## + # RPC-specific configuration for `list_glossary_categories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossary_categories + ## + # RPC-specific configuration for `create_glossary_term` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary_term + ## + # RPC-specific configuration for `update_glossary_term` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary_term + ## + # RPC-specific configuration for `delete_glossary_term` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary_term + ## + # RPC-specific configuration for `get_glossary_term` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary_term + ## + # RPC-specific configuration for `list_glossary_terms` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossary_terms + + # @private + def initialize parent_rpcs = nil + create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary + @create_glossary = ::Gapic::Config::Method.new create_glossary_config + update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary + @update_glossary = ::Gapic::Config::Method.new update_glossary_config + delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary + @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config + get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary + @get_glossary = ::Gapic::Config::Method.new get_glossary_config + list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries + @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config + create_glossary_category_config = parent_rpcs.create_glossary_category if parent_rpcs.respond_to? :create_glossary_category + @create_glossary_category = ::Gapic::Config::Method.new create_glossary_category_config + update_glossary_category_config = parent_rpcs.update_glossary_category if parent_rpcs.respond_to? :update_glossary_category + @update_glossary_category = ::Gapic::Config::Method.new update_glossary_category_config + delete_glossary_category_config = parent_rpcs.delete_glossary_category if parent_rpcs.respond_to? :delete_glossary_category + @delete_glossary_category = ::Gapic::Config::Method.new delete_glossary_category_config + get_glossary_category_config = parent_rpcs.get_glossary_category if parent_rpcs.respond_to? :get_glossary_category + @get_glossary_category = ::Gapic::Config::Method.new get_glossary_category_config + list_glossary_categories_config = parent_rpcs.list_glossary_categories if parent_rpcs.respond_to? :list_glossary_categories + @list_glossary_categories = ::Gapic::Config::Method.new list_glossary_categories_config + create_glossary_term_config = parent_rpcs.create_glossary_term if parent_rpcs.respond_to? :create_glossary_term + @create_glossary_term = ::Gapic::Config::Method.new create_glossary_term_config + update_glossary_term_config = parent_rpcs.update_glossary_term if parent_rpcs.respond_to? :update_glossary_term + @update_glossary_term = ::Gapic::Config::Method.new update_glossary_term_config + delete_glossary_term_config = parent_rpcs.delete_glossary_term if parent_rpcs.respond_to? :delete_glossary_term + @delete_glossary_term = ::Gapic::Config::Method.new delete_glossary_term_config + get_glossary_term_config = parent_rpcs.get_glossary_term if parent_rpcs.respond_to? :get_glossary_term + @get_glossary_term = ::Gapic::Config::Method.new get_glossary_term_config + list_glossary_terms_config = parent_rpcs.list_glossary_terms if parent_rpcs.respond_to? :list_glossary_terms + @list_glossary_terms = ::Gapic::Config::Method.new list_glossary_terms_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.rb new file mode 100644 index 000000000000..e626e6248b1a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module BusinessGlossaryService + # Credentials for the BusinessGlossaryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/operations.rb new file mode 100644 index 000000000000..e05a304394c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_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 BusinessGlossaryService + # 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 BusinessGlossaryService 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 BusinessGlossaryService 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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/paths.rb new file mode 100644 index 000000000000..74144c722c39 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/paths.rb @@ -0,0 +1,111 @@ +# 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 + module BusinessGlossaryService + # Path helper methods for the BusinessGlossaryService API. + module Paths + ## + # Create a fully-qualified Glossary resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/glossaries/{glossary}` + # + # @param project [String] + # @param location [String] + # @param glossary [String] + # + # @return [::String] + def glossary_path project:, location:, glossary: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/glossaries/#{glossary}" + end + + ## + # Create a fully-qualified GlossaryCategory resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/glossaries/{glossary}/categories/{glossary_category}` + # + # @param project [String] + # @param location [String] + # @param glossary [String] + # @param glossary_category [String] + # + # @return [::String] + def glossary_category_path project:, location:, glossary:, glossary_category: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "glossary cannot contain /" if glossary.to_s.include? "/" + + "projects/#{project}/locations/#{location}/glossaries/#{glossary}/categories/#{glossary_category}" + end + + ## + # Create a fully-qualified GlossaryTerm resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/glossaries/{glossary}/terms/{glossary_term}` + # + # @param project [String] + # @param location [String] + # @param glossary [String] + # @param glossary_term [String] + # + # @return [::String] + def glossary_term_path project:, location:, glossary:, glossary_term: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "glossary cannot contain /" if glossary.to_s.include? "/" + + "projects/#{project}/locations/#{location}/glossaries/#{glossary}/terms/#{glossary_term}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest.rb new file mode 100644 index 000000000000..1f31dc979ffb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest.rb @@ -0,0 +1,59 @@ +# 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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/business_glossary_service/credentials" +require "google/cloud/dataplex/v1/business_glossary_service/paths" +require "google/cloud/dataplex/v1/business_glossary_service/rest/operations" +require "google/cloud/dataplex/v1/business_glossary_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # BusinessGlossaryService provides APIs for managing business glossary + # resources for enterprise customers. + # The resources currently supported in Business Glossary are: + # 1. Glossary + # 2. GlossaryCategory + # 3. GlossaryTerm + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/business_glossary_service/rest" + # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + module BusinessGlossaryService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/business_glossary_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb new file mode 100644 index 000000000000..76a1d9952fb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb @@ -0,0 +1,1863 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/business_glossary_pb" +require "google/cloud/dataplex/v1/business_glossary_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module BusinessGlossaryService + module Rest + ## + # REST client for the BusinessGlossaryService service. + # + # BusinessGlossaryService provides APIs for managing business glossary + # resources for enterprise customers. + # The resources currently supported in Business Glossary are: + # 1. Glossary + # 2. GlossaryCategory + # 3. GlossaryTerm + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :business_glossary_service_stub + + ## + # Configure the BusinessGlossaryService Client class. + # + # See {::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BusinessGlossaryService clients + # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BusinessGlossaryService 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::BusinessGlossaryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @business_glossary_service_stub.universe_domain + end + + ## + # Create a new BusinessGlossaryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BusinessGlossaryService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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 + + @business_glossary_service_stub = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @business_glossary_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @business_glossary_service_stub.endpoint + config.universe_domain = @business_glossary_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @business_glossary_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 = @business_glossary_service_stub.endpoint + config.universe_domain = @business_glossary_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @business_glossary_service_stub.logger + end + + # Service calls + + ## + # Creates a new Glossary resource. + # + # @overload create_glossary(request, options = nil) + # Pass arguments to `create_glossary` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary(parent: nil, glossary_id: nil, glossary: nil, validate_only: nil) + # Pass arguments to `create_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Glossary will be created. + # Format: projects/\\{project_id_or_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param glossary_id [::String] + # Required. Glossary ID: Glossary identifier. + # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash] + # Required. The Glossary to create. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually creating the Glossary. + # Default: 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::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new + # + # # Call the create_glossary method. + # result = client.create_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest + + # Converts hash and nil to an 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_glossary.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_glossary.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.create_glossary 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 Glossary resource. + # + # @overload update_glossary(request, options = nil) + # Pass arguments to `update_glossary` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary(glossary: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash] + # Required. The Glossary to update. + # The Glossary's `name` field is used to identify the Glossary to update. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @param validate_only [::Boolean] + # Optional. Validates the request without actually updating the Glossary. + # Default: 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::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new + # + # # Call the update_glossary method. + # result = client.update_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest + + # Converts hash and nil to an 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_glossary.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_glossary.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.update_glossary 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 Glossary resource. All the categories and terms within the + # Glossary must be deleted before the Glossary can be deleted. + # + # @overload delete_glossary(request, options = nil) + # Pass arguments to `delete_glossary` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary(name: nil, etag: nil) + # Pass arguments to `delete_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Glossary to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # @param etag [::String] + # Optional. The etag of the Glossary. + # 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. + # @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::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new + # + # # Call the delete_glossary method. + # result = client.delete_glossary request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest + + # Converts hash and nil to an 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_glossary.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_glossary.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.delete_glossary 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 Glossary resource. + # + # @overload get_glossary(request, options = nil) + # Pass arguments to `get_glossary` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetGlossaryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary(name: nil) + # Pass arguments to `get_glossary` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Glossary to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Glossary] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Glossary] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetGlossaryRequest.new + # + # # Call the get_glossary method. + # result = client.get_glossary request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Glossary. + # p result + # + def get_glossary request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryRequest + + # Converts hash and nil to an 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_glossary.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_glossary.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_glossary.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.get_glossary 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 Glossary resources in a project and location. + # + # @overload list_glossaries(request, options = nil) + # Pass arguments to `list_glossaries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListGlossariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListGlossariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_glossaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which has this collection of Glossaries. + # Format: projects/\\{project_id_or_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. The maximum number of Glossaries to return. The service may + # return fewer than this value. If unspecified, at most 50 Glossaries 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 `ListGlossaries` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListGlossaries` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. Filter expression that filters Glossaries listed in the response. + # Filters on proto fields of Glossary are supported. + # Examples of using a filter are: + # - `display_name="my-glossary"` + # - `categoryCount=1` + # - `termCount=0` + # @param order_by [::String] + # Optional. Order by expression that orders Glossaries listed in the + # response. Order by fields are: `name` or `create_time` for the result. If + # not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListGlossariesRequest.new + # + # # Call the list_glossaries method. + # result = client.list_glossaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Glossary. + # p item + # end + # + def list_glossaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossariesRequest + + # Converts hash and nil to an 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_glossaries.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_glossaries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_glossaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.list_glossaries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @business_glossary_service_stub, :list_glossaries, "glossaries", 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 + + ## + # Creates a new GlossaryCategory resource. + # + # @overload create_glossary_category(request, options = nil) + # Pass arguments to `create_glossary_category` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_category(parent: nil, category_id: nil, category: nil) + # Pass arguments to `create_glossary_category` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryCategory will be created. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # where `locationId` refers to a Google Cloud region. + # @param category_id [::String] + # Required. GlossaryCategory identifier. + # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash] + # Required. The GlossaryCategory to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new + # + # # Call the create_glossary_category method. + # result = client.create_glossary_category request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. + # p result + # + def create_glossary_category request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest + + # Converts hash and nil to an 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_glossary_category.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_glossary_category.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_glossary_category.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.create_glossary_category 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 + + ## + # Updates a GlossaryCategory resource. + # + # @overload update_glossary_category(request, options = nil) + # Pass arguments to `update_glossary_category` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_category(category: nil, update_mask: nil) + # Pass arguments to `update_glossary_category` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash] + # Required. The GlossaryCategory to update. + # The GlossaryCategory's `name` field is used to identify the + # GlossaryCategory to update. Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new + # + # # Call the update_glossary_category method. + # result = client.update_glossary_category request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. + # p result + # + def update_glossary_category request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest + + # Converts hash and nil to an 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_glossary_category.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_glossary_category.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_glossary_category.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.update_glossary_category 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 a GlossaryCategory resource. All the GlossaryCategories and + # GlossaryTerms nested directly under the specified GlossaryCategory will be + # moved one level up to the parent in the hierarchy. + # + # @overload delete_glossary_category(request, options = nil) + # Pass arguments to `delete_glossary_category` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_category(name: nil) + # Pass arguments to `delete_glossary_category` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryCategory to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new + # + # # Call the delete_glossary_category method. + # result = client.delete_glossary_category request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_glossary_category request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest + + # Converts hash and nil to an 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_glossary_category.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_glossary_category.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_glossary_category.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.delete_glossary_category 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 a GlossaryCategory resource. + # + # @overload get_glossary_category(request, options = nil) + # Pass arguments to `get_glossary_category` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_category(name: nil) + # Pass arguments to `get_glossary_category` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryCategory to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new + # + # # Call the get_glossary_category method. + # result = client.get_glossary_category request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. + # p result + # + def get_glossary_category request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest + + # Converts hash and nil to an 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_glossary_category.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_glossary_category.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_glossary_category.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.get_glossary_category 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 GlossaryCategory resources in a Glossary. + # + # @overload list_glossary_categories(request, options = nil) + # Pass arguments to `list_glossary_categories` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_categories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_glossary_categories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which has this collection of GlossaryCategories. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # Location is the Google Cloud region. + # @param page_size [::Integer] + # Optional. The maximum number of GlossaryCategories to return. The service + # may return fewer than this value. If unspecified, at most 50 + # GlossaryCategories 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 `ListGlossaryCategories` + # call. Provide this to retrieve the subsequent page. When paginating, all + # other parameters provided to `ListGlossaryCategories` must match the call + # that provided the page token. + # @param filter [::String] + # Optional. Filter expression that filters GlossaryCategories listed in the + # response. Filters are supported on the following fields: + # - immediate_parent + # + # Examples of using a filter are: + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` + # + # This will only return the GlossaryCategories that are directly nested + # under the specified parent. + # @param order_by [::String] + # Optional. Order by expression that orders GlossaryCategories listed in the + # response. Order by fields are: `name` or `create_time` for the result. If + # not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.new + # + # # Call the list_glossary_categories method. + # result = client.list_glossary_categories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryCategory. + # p item + # end + # + def list_glossary_categories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest + + # Converts hash and nil to an 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_glossary_categories.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_glossary_categories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_glossary_categories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.list_glossary_categories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_categories, "categories", 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 + + ## + # Creates a new GlossaryTerm resource. + # + # @overload create_glossary_term(request, options = nil) + # Pass arguments to `create_glossary_term` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_term(parent: nil, term_id: nil, term: nil) + # Pass arguments to `create_glossary_term` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 the GlossaryTerm will be created. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # where `location_id` refers to a Google Cloud region. + # @param term_id [::String] + # Required. GlossaryTerm identifier. + # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash] + # Required. The GlossaryTerm to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new + # + # # Call the create_glossary_term method. + # result = client.create_glossary_term request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. + # p result + # + def create_glossary_term request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest + + # Converts hash and nil to an 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_glossary_term.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_glossary_term.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_glossary_term.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.create_glossary_term 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 + + ## + # Updates a GlossaryTerm resource. + # + # @overload update_glossary_term(request, options = nil) + # Pass arguments to `update_glossary_term` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_term(term: nil, update_mask: nil) + # Pass arguments to `update_glossary_term` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash] + # Required. The GlossaryTerm to update. + # The GlossaryTerm's `name` field is used to identify the GlossaryTerm to + # update. Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new + # + # # Call the update_glossary_term method. + # result = client.update_glossary_term request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. + # p result + # + def update_glossary_term request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest + + # Converts hash and nil to an 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_glossary_term.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_glossary_term.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_glossary_term.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.update_glossary_term 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 a GlossaryTerm resource. + # + # @overload delete_glossary_term(request, options = nil) + # Pass arguments to `delete_glossary_term` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_term(name: nil) + # Pass arguments to `delete_glossary_term` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryTerm to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new + # + # # Call the delete_glossary_term method. + # result = client.delete_glossary_term request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_glossary_term request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest + + # Converts hash and nil to an 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_glossary_term.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_glossary_term.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_glossary_term.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.delete_glossary_term 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 a GlossaryTerm resource. + # + # @overload get_glossary_term(request, options = nil) + # Pass arguments to `get_glossary_term` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_term(name: nil) + # Pass arguments to `get_glossary_term` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GlossaryTerm to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new + # + # # Call the get_glossary_term method. + # result = client.get_glossary_term request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. + # p result + # + def get_glossary_term request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest + + # Converts hash and nil to an 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_glossary_term.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_glossary_term.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_glossary_term.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.get_glossary_term 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 GlossaryTerm resources in a Glossary. + # + # @overload list_glossary_terms(request, options = nil) + # Pass arguments to `list_glossary_terms` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_glossary_terms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_glossary_terms` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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, which has this collection of GlossaryTerms. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. The maximum number of GlossaryTerms to return. The service may + # return fewer than this value. If unspecified, at most 50 GlossaryTerms 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 `ListGlossaryTerms` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListGlossaryTerms` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. Filter expression that filters GlossaryTerms listed in the + # response. Filters are supported on the following fields: + # - immediate_parent + # + # Examples of using a filter are: + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` + # + # This will only return the GlossaryTerms that are directly nested under the + # specified parent. + # @param order_by [::String] + # Optional. Order by expression that orders GlossaryTerms listed in the + # response. Order by fields are: `name` or `create_time` for the result. If + # not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.new + # + # # Call the list_glossary_terms method. + # result = client.list_glossary_terms request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryTerm. + # p item + # end + # + def list_glossary_terms request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest + + # Converts hash and nil to an 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_glossary_terms.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_glossary_terms.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_glossary_terms.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @business_glossary_service_stub.list_glossary_terms request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_terms, "terms", 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 BusinessGlossaryService REST API. + # + # This class represents the configuration for BusinessGlossaryService 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::BusinessGlossaryService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_glossary to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_glossary.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_glossary.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + 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 BusinessGlossaryService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary + ## + # RPC-specific configuration for `update_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary + ## + # RPC-specific configuration for `delete_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary + ## + # RPC-specific configuration for `get_glossary` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary + ## + # RPC-specific configuration for `list_glossaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossaries + ## + # RPC-specific configuration for `create_glossary_category` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary_category + ## + # RPC-specific configuration for `update_glossary_category` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary_category + ## + # RPC-specific configuration for `delete_glossary_category` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary_category + ## + # RPC-specific configuration for `get_glossary_category` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary_category + ## + # RPC-specific configuration for `list_glossary_categories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossary_categories + ## + # RPC-specific configuration for `create_glossary_term` + # @return [::Gapic::Config::Method] + # + attr_reader :create_glossary_term + ## + # RPC-specific configuration for `update_glossary_term` + # @return [::Gapic::Config::Method] + # + attr_reader :update_glossary_term + ## + # RPC-specific configuration for `delete_glossary_term` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_glossary_term + ## + # RPC-specific configuration for `get_glossary_term` + # @return [::Gapic::Config::Method] + # + attr_reader :get_glossary_term + ## + # RPC-specific configuration for `list_glossary_terms` + # @return [::Gapic::Config::Method] + # + attr_reader :list_glossary_terms + + # @private + def initialize parent_rpcs = nil + create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary + @create_glossary = ::Gapic::Config::Method.new create_glossary_config + update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary + @update_glossary = ::Gapic::Config::Method.new update_glossary_config + delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary + @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config + get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary + @get_glossary = ::Gapic::Config::Method.new get_glossary_config + list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries + @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config + create_glossary_category_config = parent_rpcs.create_glossary_category if parent_rpcs.respond_to? :create_glossary_category + @create_glossary_category = ::Gapic::Config::Method.new create_glossary_category_config + update_glossary_category_config = parent_rpcs.update_glossary_category if parent_rpcs.respond_to? :update_glossary_category + @update_glossary_category = ::Gapic::Config::Method.new update_glossary_category_config + delete_glossary_category_config = parent_rpcs.delete_glossary_category if parent_rpcs.respond_to? :delete_glossary_category + @delete_glossary_category = ::Gapic::Config::Method.new delete_glossary_category_config + get_glossary_category_config = parent_rpcs.get_glossary_category if parent_rpcs.respond_to? :get_glossary_category + @get_glossary_category = ::Gapic::Config::Method.new get_glossary_category_config + list_glossary_categories_config = parent_rpcs.list_glossary_categories if parent_rpcs.respond_to? :list_glossary_categories + @list_glossary_categories = ::Gapic::Config::Method.new list_glossary_categories_config + create_glossary_term_config = parent_rpcs.create_glossary_term if parent_rpcs.respond_to? :create_glossary_term + @create_glossary_term = ::Gapic::Config::Method.new create_glossary_term_config + update_glossary_term_config = parent_rpcs.update_glossary_term if parent_rpcs.respond_to? :update_glossary_term + @update_glossary_term = ::Gapic::Config::Method.new update_glossary_term_config + delete_glossary_term_config = parent_rpcs.delete_glossary_term if parent_rpcs.respond_to? :delete_glossary_term + @delete_glossary_term = ::Gapic::Config::Method.new delete_glossary_term_config + get_glossary_term_config = parent_rpcs.get_glossary_term if parent_rpcs.respond_to? :get_glossary_term + @get_glossary_term = ::Gapic::Config::Method.new get_glossary_term_config + list_glossary_terms_config = parent_rpcs.list_glossary_terms if parent_rpcs.respond_to? :list_glossary_terms + @list_glossary_terms = ::Gapic::Config::Method.new list_glossary_terms_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/operations.rb new file mode 100644 index 000000000000..e0db8df70a50 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_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 BusinessGlossaryService + 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 BusinessGlossaryService 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 BusinessGlossaryService 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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/service_stub.rb new file mode 100644 index 000000000000..2bd5b4eab85f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/service_stub.rb @@ -0,0 +1,1002 @@ +# 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 "google/cloud/dataplex/v1/business_glossary_pb" + +module Google + module Cloud + module Dataplex + module V1 + module BusinessGlossaryService + module Rest + ## + # REST service stub for the BusinessGlossaryService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_glossary REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_glossary request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary", + 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_glossary REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_glossary request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary", + 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_glossary REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_glossary request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary", + 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_glossary REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Glossary] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Glossary] + # A result object deserialized from the server's reply + def get_glossary request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Glossary.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_glossaries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossariesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::ListGlossariesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListGlossariesResponse] + # A result object deserialized from the server's reply + def list_glossaries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_glossaries_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossaries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListGlossariesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_glossary_category REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GlossaryCategory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # A result object deserialized from the server's reply + def create_glossary_category request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_category_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_category", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.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_glossary_category REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GlossaryCategory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # A result object deserialized from the server's reply + def update_glossary_category request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_category_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_category", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.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_glossary_category REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_glossary_category request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_category_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_category", + 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 get_glossary_category REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GlossaryCategory] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # A result object deserialized from the server's reply + def get_glossary_category request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_category_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_category", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.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_glossary_categories REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::ListGlossaryCategoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse] + # A result object deserialized from the server's reply + def list_glossary_categories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_glossary_categories_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_categories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_glossary_term REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GlossaryTerm] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # A result object deserialized from the server's reply + def create_glossary_term request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_term_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_term", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.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_glossary_term REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GlossaryTerm] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # A result object deserialized from the server's reply + def update_glossary_term request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_term_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_term", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.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_glossary_term REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_glossary_term request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_term_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_term", + 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 get_glossary_term REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GlossaryTerm] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # A result object deserialized from the server's reply + def get_glossary_term request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_term_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_term", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.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_glossary_terms REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::ListGlossaryTermsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse] + # A result object deserialized from the server's reply + def list_glossary_terms request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_glossary_terms_request request_pb + query_string_params = if query_string_params.any? + query_string_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_glossary_terms", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse.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 create_glossary REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryRequest] + # 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_glossary_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/glossaries", + body: "glossary", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_glossary REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest] + # 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_glossary_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{glossary.name}", + body: "glossary", + matches: [ + ["glossary.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_glossary REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest] + # 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_glossary_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_glossary REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryRequest] + # 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_glossary_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_glossaries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossariesRequest] + # 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_glossaries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/glossaries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_glossary_category REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest] + # 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_glossary_category_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/categories", + body: "category", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_glossary_category REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest] + # 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_glossary_category_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{category.name}", + body: "category", + matches: [ + ["category.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_glossary_category REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest] + # 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_glossary_category_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_glossary_category REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest] + # 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_glossary_category_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_glossary_categories REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest] + # 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_glossary_categories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/categories", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_glossary_term REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest] + # 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_glossary_term_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/terms", + body: "term", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_glossary_term REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest] + # 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_glossary_term_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{term.name}", + body: "term", + matches: [ + ["term.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_glossary_term REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest] + # 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_glossary_term_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_glossary_term REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest] + # 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_glossary_term_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_glossary_terms REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest] + # 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_glossary_terms_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/terms", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_services_pb.rb new file mode 100644 index 000000000000..4b08e18aed0e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_services_pb.rb @@ -0,0 +1,81 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/business_glossary.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/business_glossary_pb' + +module Google + module Cloud + module Dataplex + module V1 + module BusinessGlossaryService + # BusinessGlossaryService provides APIs for managing business glossary + # resources for enterprise customers. + # The resources currently supported in Business Glossary are: + # 1. Glossary + # 2. GlossaryCategory + # 3. GlossaryTerm + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.BusinessGlossaryService' + + # Creates a new Glossary resource. + rpc :CreateGlossary, ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, ::Google::Longrunning::Operation + # Updates a Glossary resource. + rpc :UpdateGlossary, ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, ::Google::Longrunning::Operation + # Deletes a Glossary resource. All the categories and terms within the + # Glossary must be deleted before the Glossary can be deleted. + rpc :DeleteGlossary, ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, ::Google::Longrunning::Operation + # Gets a Glossary resource. + rpc :GetGlossary, ::Google::Cloud::Dataplex::V1::GetGlossaryRequest, ::Google::Cloud::Dataplex::V1::Glossary + # Lists Glossary resources in a project and location. + rpc :ListGlossaries, ::Google::Cloud::Dataplex::V1::ListGlossariesRequest, ::Google::Cloud::Dataplex::V1::ListGlossariesResponse + # Creates a new GlossaryCategory resource. + rpc :CreateGlossaryCategory, ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, ::Google::Cloud::Dataplex::V1::GlossaryCategory + # Updates a GlossaryCategory resource. + rpc :UpdateGlossaryCategory, ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, ::Google::Cloud::Dataplex::V1::GlossaryCategory + # Deletes a GlossaryCategory resource. All the GlossaryCategories and + # GlossaryTerms nested directly under the specified GlossaryCategory will be + # moved one level up to the parent in the hierarchy. + rpc :DeleteGlossaryCategory, ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, ::Google::Protobuf::Empty + # Gets a GlossaryCategory resource. + rpc :GetGlossaryCategory, ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, ::Google::Cloud::Dataplex::V1::GlossaryCategory + # Lists GlossaryCategory resources in a Glossary. + rpc :ListGlossaryCategories, ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse + # Creates a new GlossaryTerm resource. + rpc :CreateGlossaryTerm, ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, ::Google::Cloud::Dataplex::V1::GlossaryTerm + # Updates a GlossaryTerm resource. + rpc :UpdateGlossaryTerm, ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, ::Google::Cloud::Dataplex::V1::GlossaryTerm + # Deletes a GlossaryTerm resource. + rpc :DeleteGlossaryTerm, ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, ::Google::Protobuf::Empty + # Gets a GlossaryTerm resource. + rpc :GetGlossaryTerm, ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, ::Google::Cloud::Dataplex::V1::GlossaryTerm + # Lists GlossaryTerm resources in a Glossary. + rpc :ListGlossaryTerms, ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, ::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb new file mode 100644 index 000000000000..558348780ca9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/catalog.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/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/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\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\"\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 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an EntryType. + # + # @overload update_entry_type(request, options = nil) + # Pass arguments to `update_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. 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::UpdateEntryTypeRequest.new + # + # # Call the update_entry_type method. + # result = client.update_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entry_type.metadata.to_h + + # Set x-goog-api-client, 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_type&.name + header_params["entry_type.name"] = request.entry_type.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an EntryType. + # + # @overload delete_entry_type(request, options = nil) + # Pass arguments to `delete_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entry_type(name: nil, etag: nil) + # Pass arguments to `delete_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryTypeRequest method returns an ABORTED error response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new + # + # # Call the delete_entry_type method. + # result = client.delete_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entry_type.metadata.to_h + + # Set x-goog-api-client, 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_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryType resources in a project and location. + # + # @overload list_entry_types(request, options = nil) + # Pass arguments to `list_entry_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the EntryType location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of EntryTypes to return. The service may return + # fewer than this value. If unspecified, the service returns at most 10 + # EntryTypes. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListEntryTypes` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters you provided to `ListEntryTypes` must match the call that + # provided the page token. + # @param filter [::String] + # Optional. Filter request. Filters are case-sensitive. + # The service supports the following formats: + # + # * labels.key1 = "value1" + # * labels:key1 + # * name = "value" + # + # These restrictions can be conjoined with AND, OR, and NOT conjunctions. + # @param order_by [::String] + # Optional. Orders the result by `name` or `create_time` fields. + # If not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new + # + # # Call the list_entry_types method. + # result = client.list_entry_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. + # p item + # end + # + def list_entry_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entry_types.metadata.to_h + + # Set x-goog-api-client, 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_entry_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entry_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_entry_types, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_types, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an EntryType. + # + # @overload get_entry_type(request, options = nil) + # Pass arguments to `get_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entry_type(name: nil) + # Pass arguments to `get_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new + # + # # Call the get_entry_type method. + # result = client.get_entry_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. + # p result + # + def get_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entry_type.metadata.to_h + + # Set x-goog-api-client, 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_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry_type, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an AspectType. + # + # @overload create_aspect_type(request, options = nil) + # Pass arguments to `create_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) + # Pass arguments to `create_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param aspect_type_id [::String] + # Required. AspectType identifier. + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource. + # @param validate_only [::Boolean] + # Optional. 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::CreateAspectTypeRequest.new + # + # # Call the create_aspect_type method. + # result = client.create_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_aspect_type.metadata.to_h + + # Set x-goog-api-client, 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_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_aspect_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an AspectType. + # + # @overload update_aspect_type(request, options = nil) + # Pass arguments to `update_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new + # + # # Call the update_aspect_type method. + # result = client.update_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_aspect_type.metadata.to_h + + # Set x-goog-api-client, 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.aspect_type&.name + header_params["aspect_type.name"] = request.aspect_type.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_aspect_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an AspectType. + # + # @overload delete_aspect_type(request, options = nil) + # Pass arguments to `delete_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_aspect_type(name: nil, etag: nil) + # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteAspectTypeRequest method returns an ABORTED error + # response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new + # + # # Call the delete_aspect_type method. + # result = client.delete_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_aspect_type.metadata.to_h + + # Set x-goog-api-client, 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_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_aspect_type, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists AspectType resources in a project and location. + # + # @overload list_aspect_types(request, options = nil) + # Pass arguments to `list_aspect_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_aspect_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AspectType location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of AspectTypes to return. The service may return + # fewer than this value. If unspecified, the service returns at most 10 + # AspectTypes. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListAspectTypes` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters you provide to `ListAspectTypes` must match the call that + # provided the page token. + # @param filter [::String] + # Optional. Filter request. Filters are case-sensitive. + # The service supports the following formats: + # + # * labels.key1 = "value1" + # * labels:key1 + # * name = "value" + # + # These restrictions can be conjoined with AND, OR, and NOT conjunctions. + # @param order_by [::String] + # Optional. Orders the result by `name` or `create_time` fields. + # If not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new + # + # # Call the list_aspect_types method. + # result = client.list_aspect_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. + # p item + # end + # + def list_aspect_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_aspect_types.metadata.to_h + + # Set x-goog-api-client, 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_aspect_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_aspect_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_aspect_types, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_aspect_types, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an AspectType. + # + # @overload get_aspect_type(request, options = nil) + # Pass arguments to `get_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_aspect_type(name: nil) + # Pass arguments to `get_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::AspectType] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new + # + # # Call the get_aspect_type method. + # result = client.get_aspect_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. + # p result + # + def get_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_aspect_type.metadata.to_h + + # Set x-goog-api-client, 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_aspect_type.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_aspect_type, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an EntryGroup. + # + # @overload create_entry_group(request, options = nil) + # Pass arguments to `create_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) + # Pass arguments to `create_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the entryGroup, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param entry_group_id [::String] + # Required. EntryGroup identifier. + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource. + # @param validate_only [::Boolean] + # Optional. 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::CreateEntryGroupRequest.new + # + # # Call the create_entry_group method. + # result = client.create_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entry_group.metadata.to_h + + # Set x-goog-api-client, 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_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_entry_group, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an EntryGroup. + # + # @overload update_entry_group(request, options = nil) + # Pass arguments to `update_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. 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::UpdateEntryGroupRequest.new + # + # # Call the update_entry_group method. + # result = client.update_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entry_group.metadata.to_h + + # Set x-goog-api-client, 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_group&.name + header_params["entry_group.name"] = request.entry_group.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry_group, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an EntryGroup. + # + # @overload delete_entry_group(request, options = nil) + # Pass arguments to `delete_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entry_group(name: nil, etag: nil) + # Pass arguments to `delete_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryGroupRequest method returns an ABORTED error + # response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new + # + # # Call the delete_entry_group method. + # result = client.delete_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entry_group.metadata.to_h + + # Set x-goog-api-client, 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_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry_group, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryGroup resources in a project and location. + # + # @overload list_entry_groups(request, options = nil) + # Pass arguments to `list_entry_groups` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the entryGroup location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of EntryGroups to return. The service may return + # fewer than this value. If unspecified, the service returns at most 10 + # EntryGroups. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListEntryGroups` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters you provide to `ListEntryGroups` must match the call that + # provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new + # + # # Call the list_entry_groups method. + # result = client.list_entry_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. + # p item + # end + # + def list_entry_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entry_groups.metadata.to_h + + # Set x-goog-api-client, 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_entry_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entry_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_entry_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_groups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an EntryGroup. + # + # @overload get_entry_group(request, options = nil) + # Pass arguments to `get_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entry_group(name: nil) + # Pass arguments to `get_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryGroup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new + # + # # Call the get_entry_group method. + # result = client.get_entry_group request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. + # p result + # + def get_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entry_group.metadata.to_h + + # Set x-goog-api-client, 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_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry_group, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an Entry. + # + # @overload create_entry(request, options = nil) + # Pass arguments to `create_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entry(parent: nil, entry_id: nil, entry: nil) + # Pass arguments to `create_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param entry_id [::String] + # Required. Entry identifier. It has to be unique within an Entry Group. + # + # Entries corresponding to Google Cloud resources use an Entry ID format + # based on [full resource + # names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + # The format is a full resource name of the resource without the + # prefix double slashes in the API service name part of the full resource + # name. This allows retrieval of entries using their associated resource + # name. + # + # For example, if the full resource name of a resource is + # `//library.googleapis.com/shelves/shelf1/books/book2`, + # then the suggested entry_id is + # `library.googleapis.com/shelves/shelf1/books/book2`. + # + # It is also suggested to follow the same convention for entries + # corresponding to resources from providers or systems other than Google + # Cloud. + # + # The maximum size of the field is 4000 characters. + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new + # + # # Call the create_entry method. + # result = client.create_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def create_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entry.metadata.to_h + + # Set x-goog-api-client, 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_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_entry, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an Entry. + # + # @overload update_entry(request, options = nil) + # Pass arguments to `update_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) + # Pass arguments to `update_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Mask of fields to update. To update Aspects, the update_mask must + # contain the value "aspects". + # + # If the update_mask is empty, the service will update all modifiable fields + # present in the request. + # @param allow_missing [::Boolean] + # Optional. If set to true and the entry doesn't exist, the service will + # create it. + # @param delete_missing_aspects [::Boolean] + # Optional. If set to true and the aspect_keys specify aspect ranges, the + # service deletes any existing aspects from that range that weren't provided + # in the request. + # @param aspect_keys [::Array<::String>] + # Optional. The map keys of the Aspects which the service should modify. It + # supports the following syntaxes: + # + # * `` - matches an aspect of the given type and empty + # path. + # * `@path` - matches an aspect of the given type and + # specified path. For example, to attach an aspect to a field that is + # specified by the `schema` aspect, the path should have the format + # `Schema.`. + # * `@*` - matches aspects of the given type for all + # paths. + # * `*@path` - matches aspects of all types on the given path. + # + # The service will not remove existing aspects matching the syntax unless + # `delete_missing_aspects` is set to true. + # + # If this field is left empty, the service treats it as specifying + # exactly those Aspects present in the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new + # + # # Call the update_entry method. + # result = client.update_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def update_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entry.metadata.to_h + + # Set x-goog-api-client, 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&.name + header_params["entry.name"] = request.entry.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :update_entry, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an Entry. + # + # @overload delete_entry(request, options = nil) + # Pass arguments to `delete_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entry(name: nil) + # Pass arguments to `delete_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new + # + # # Call the delete_entry method. + # result = client.delete_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def delete_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entry.metadata.to_h + + # Set x-goog-api-client, 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.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :delete_entry, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Entries within an EntryGroup. + # + # @overload list_entries(request, options = nil) + # Pass arguments to `list_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param page_size [::Integer] + # Optional. Number of items to return per page. If there are remaining + # results, the service returns a next_page_token. If unspecified, the service + # returns at most 10 Entries. The maximum value is 100; values above 100 will + # be coerced to 100. + # @param page_token [::String] + # Optional. Page token received from a previous `ListEntries` call. Provide + # this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter on the entries to return. Filters are case-sensitive. + # You can filter the request by the following fields: + # + # * entry_type + # * entry_source.display_name + # * parent_entry + # + # The comparison operators are =, !=, <, >, <=, >=. The service compares + # strings according to lexical order. + # + # You can use the logical operators AND, OR, NOT in the filter. + # + # You can use Wildcard "*", but for entry_type and parent_entry you need to + # provide the full project id or number. + # + # You cannot use parent_entry in conjunction with other fields. + # + # Example filter expressions: + # + # * "entry_source.display_name=AnExampleDisplayName" + # * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + # * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + # entry_type=projects/another-project/locations/*" + # * "NOT entry_source.display_name=AnotherExampleDisplayName" + # * "parent_entry=projects/example-project/locations/us/entryGroups/example-entry-group/entries/example-entry" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new + # + # # Call the list_entries method. + # result = client.list_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. + # p item + # end + # + def list_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entries.metadata.to_h + + # Set x-goog-api-client, 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_entries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_entries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entries, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Entry. + # + # @overload get_entry(request, options = nil) + # Pass arguments to `get_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) + # Pass arguments to `get_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View to control which parts of an entry the service should + # return. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # It only works for CUSTOM view. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. It only works for CUSTOM view. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new + # + # # Call the get_entry method. + # result = client.get_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def get_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entry.metadata.to_h + + # Set x-goog-api-client, 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.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_entry, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up an entry by name using the permission on the source system. + # + # @overload lookup_entry(request, options = nil) + # Pass arguments to `lookup_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) + # Pass arguments to `lookup_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View to control which parts of an entry the service should + # return. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # It only works for CUSTOM view. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. It only works for CUSTOM view. + # @param entry [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new + # + # # Call the lookup_entry method. + # result = client.lookup_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def lookup_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_entry.metadata.to_h + + # Set x-goog-api-client, 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.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :lookup_entry, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for Entries matching the given query and scope. + # + # @overload search_entries(request, options = nil) + # Pass arguments to `search_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil, semantic_search: nil) + # Pass arguments to `search_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/global`. + # @param query [::String] + # Required. The query against which entries in scope should be matched. + # The query syntax is defined in [Search syntax for Dataplex Universal + # Catalog](https://cloud.google.com/dataplex/docs/search-syntax). + # @param page_size [::Integer] + # Optional. Number of results in the search page. If <=0, then defaults + # to 10. Max limit for page_size is 1000. Throws an invalid argument for + # page_size > 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `SearchEntries` call. Provide + # this to retrieve the subsequent page. + # @param order_by [::String] + # Optional. Specifies the ordering of results. + # Supported values are: + # + # * `relevance` + # * `last_modified_timestamp` + # * `last_modified_timestamp asc` + # @param scope [::String] + # Optional. The scope under which the search should be operating. It must + # either be `organizations/` or `projects/`. If it is + # unspecified, it defaults to the organization where the project provided in + # `name` is located. + # @param semantic_search [::Boolean] + # Optional. Specifies whether the search should understand the meaning and + # intent behind the query, rather than just matching keywords. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new + # + # # Call the search_entries method. + # result = client.search_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. + # p item + # end + # + def search_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_entries.metadata.to_h + + # Set x-goog-api-client, 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.search_entries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :search_entries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :search_entries, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a metadata job. For example, use a metadata job to import metadata + # from a third-party system into Dataplex Universal Catalog. + # + # @overload create_metadata_job(request, options = nil) + # Pass arguments to `create_metadata_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_job(parent: nil, metadata_job: nil, metadata_job_id: nil, validate_only: nil) + # Pass arguments to `create_metadata_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent location, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @param metadata_job [::Google::Cloud::Dataplex::V1::MetadataJob, ::Hash] + # Required. The metadata job resource. + # @param metadata_job_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::CreateMetadataJobRequest.new + # + # # Call the create_metadata_job method. + # result = client.create_metadata_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest + + # Converts hash and nil to 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_job.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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_metadata_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_metadata_job, 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 metadata job. + # + # @overload get_metadata_job(request, options = nil) + # Pass arguments to `get_metadata_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetMetadataJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_job(name: nil) + # Pass arguments to `get_metadata_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the metadata job, in the format + # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::MetadataJob] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::MetadataJob] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::GetMetadataJobRequest.new + # + # # Call the get_metadata_job method. + # result = client.get_metadata_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataJob. + # p result + # + def get_metadata_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest + + # Converts hash and nil to 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_metadata_job.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_metadata_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_metadata_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :get_metadata_job, 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 metadata jobs. + # + # @overload list_metadata_jobs(request, options = nil) + # Pass arguments to `list_metadata_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_metadata_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent location, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of metadata jobs to return. The service might + # return fewer jobs than this value. If unspecified, at most 10 jobs are + # returned. The maximum value is 1,000. + # @param page_token [::String] + # Optional. The page token received from a previous `ListMetadataJobs` call. + # Provide this token to retrieve the subsequent page of results. When + # paginating, all other parameters that are provided to the + # `ListMetadataJobs` request must match the call that provided the page + # token. + # @param 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::MetadataJob>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::MetadataJob>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::ListMetadataJobsRequest.new + # + # # Call the list_metadata_jobs method. + # result = client.list_metadata_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataJob. + # p item + # end + # + def list_metadata_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest + + # Converts hash and nil to 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_jobs.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_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_metadata_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :list_metadata_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_metadata_jobs, 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 + + ## + # Cancels a metadata job. + # + # If you cancel a metadata import job that is in progress, the changes in the + # job might be partially applied. We recommend that you reset the state of + # the entry groups in your project by running another metadata job that + # reverts the changes from the canceled job. + # + # @overload cancel_metadata_job(request, options = nil) + # Pass arguments to `cancel_metadata_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_job(name: nil) + # Pass arguments to `cancel_metadata_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job, in the format + # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new + # + # # Call the cancel_metadata_job method. + # result = client.cancel_metadata_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_metadata_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest + + # Converts hash and nil to 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_metadata_job.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_metadata_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_metadata_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :cancel_metadata_job, 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 an Entry Link. + # + # @overload create_entry_link(request, options = nil) + # Pass arguments to `create_entry_link` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entry_link(parent: nil, entry_link_id: nil, entry_link: nil) + # Pass arguments to `create_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 parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @param entry_link_id [::String] + # Required. Entry Link 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 EntryGroup. + # @param entry_link [::Google::Cloud::Dataplex::V1::EntryLink, ::Hash] + # Required. Entry Link resource. + # + # @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::CreateEntryLinkRequest.new + # + # # Call the create_entry_link method. + # result = client.create_entry_link request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # p result + # + def create_entry_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entry_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.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_entry_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entry_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.call_rpc :create_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 + + ## + # 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 [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. + # + # @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::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 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 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::MetadataFeed] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::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::GetMetadataFeedRequest.new + # + # # Call the get_metadata_feed method. + # result = client.get_metadata_feed request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataFeed. + # p result + # + 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::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.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 \ + 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_metadata_feed.timeout, + metadata: metadata, + 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 :get_metadata_feed, 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 + + ## + # Retrieve a list of MetadataFeeds. + # + # @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::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 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 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 [::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::DeleteMetadataFeedRequest.new + # + # # 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. + # # Here is how 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_metadata_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + 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.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 \ + 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_metadata_feed.timeout, + metadata: metadata, + 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 :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) + end + + ## + # Configuration class for the CatalogService API. + # + # This class represents the configuration for CatalogService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entry_type to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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::Cloud::Dataplex::V1::CatalogService::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 CatalogService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_type + ## + # RPC-specific configuration for `update_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_type + ## + # RPC-specific configuration for `delete_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_type + ## + # RPC-specific configuration for `list_entry_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_types + ## + # RPC-specific configuration for `get_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_type + ## + # RPC-specific configuration for `create_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_aspect_type + ## + # RPC-specific configuration for `update_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_aspect_type + ## + # RPC-specific configuration for `delete_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_aspect_type + ## + # RPC-specific configuration for `list_aspect_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aspect_types + ## + # RPC-specific configuration for `get_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_aspect_type + ## + # RPC-specific configuration for `create_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_group + ## + # RPC-specific configuration for `update_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_group + ## + # RPC-specific configuration for `delete_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_group + ## + # RPC-specific configuration for `list_entry_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_groups + ## + # RPC-specific configuration for `get_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_group + ## + # RPC-specific configuration for `create_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry + ## + # RPC-specific configuration for `update_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry + ## + # RPC-specific configuration for `delete_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry + ## + # RPC-specific configuration for `list_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entries + ## + # RPC-specific configuration for `get_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry + ## + # RPC-specific configuration for `lookup_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entry + ## + # RPC-specific configuration for `search_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :search_entries + ## + # RPC-specific configuration for `create_metadata_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_metadata_job + ## + # RPC-specific configuration for `get_metadata_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_metadata_job + ## + # RPC-specific configuration for `list_metadata_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_metadata_jobs + ## + # RPC-specific configuration for `cancel_metadata_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_metadata_job + ## + # RPC-specific configuration for `create_entry_link` + # @return [::Gapic::Config::Method] + # + 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 + create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type + @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config + update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type + @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config + delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type + @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config + list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types + @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config + get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type + @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config + create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type + @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config + update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type + @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config + delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type + @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config + list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types + @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config + get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type + @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config + create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group + @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config + update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group + @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config + delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group + @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config + list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups + @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config + get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group + @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config + create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry + @create_entry = ::Gapic::Config::Method.new create_entry_config + update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry + @update_entry = ::Gapic::Config::Method.new update_entry_config + delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry + @delete_entry = ::Gapic::Config::Method.new delete_entry_config + list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries + @list_entries = ::Gapic::Config::Method.new list_entries_config + get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry + @get_entry = ::Gapic::Config::Method.new get_entry_config + lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry + @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config + search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries + @search_entries = ::Gapic::Config::Method.new search_entries_config + create_metadata_job_config = parent_rpcs.create_metadata_job if parent_rpcs.respond_to? :create_metadata_job + @create_metadata_job = ::Gapic::Config::Method.new create_metadata_job_config + get_metadata_job_config = parent_rpcs.get_metadata_job if parent_rpcs.respond_to? :get_metadata_job + @get_metadata_job = ::Gapic::Config::Method.new get_metadata_job_config + list_metadata_jobs_config = parent_rpcs.list_metadata_jobs if parent_rpcs.respond_to? :list_metadata_jobs + @list_metadata_jobs = ::Gapic::Config::Method.new list_metadata_jobs_config + cancel_metadata_job_config = parent_rpcs.cancel_metadata_job if parent_rpcs.respond_to? :cancel_metadata_job + @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 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb new file mode 100644 index 000000000000..48938939e922 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb @@ -0,0 +1,50 @@ +# 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 "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # Credentials for the CatalogService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "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", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb new file mode 100644 index 000000000000..32cefaa774aa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_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 CatalogService + # 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 CatalogService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb new file mode 100644 index 000000000000..44cdfad19b95 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb @@ -0,0 +1,220 @@ +# 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 + module CatalogService + # Path helper methods for the CatalogService API. + module Paths + ## + # Create a fully-qualified AspectType resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/aspectTypes/{aspect_type}` + # + # @param project [String] + # @param location [String] + # @param aspect_type [String] + # + # @return [::String] + def aspect_type_path project:, location:, aspect_type: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/aspectTypes/#{aspect_type}" + end + + ## + # Create a fully-qualified Entry resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}` + # + # @param project [String] + # @param location [String] + # @param entry_group [String] + # @param entry [String] + # + # @return [::String] + def entry_path project:, location:, entry_group:, entry: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "entry_group cannot contain /" if entry_group.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entries/#{entry}" + end + + ## + # Create a fully-qualified EntryGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryGroups/{entry_group}` + # + # @param project [String] + # @param location [String] + # @param entry_group [String] + # + # @return [::String] + def entry_group_path project:, location:, entry_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}" + end + + ## + # Create a fully-qualified EntryLink resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entryLinks/{entry_link}` + # + # @param project [String] + # @param location [String] + # @param entry_group [String] + # @param entry_link [String] + # + # @return [::String] + def entry_link_path project:, location:, entry_group:, entry_link: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "entry_group cannot contain /" if entry_group.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entryLinks/#{entry_link}" + end + + ## + # Create a fully-qualified EntryType resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/entryTypes/{entry_type}` + # + # @param project [String] + # @param location [String] + # @param entry_type [String] + # + # @return [::String] + def entry_type_path project:, location:, entry_type: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/entryTypes/#{entry_type}" + end + + ## + # Create a fully-qualified Glossary resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/glossaries/{glossary}` + # + # @param project [String] + # @param location [String] + # @param glossary [String] + # + # @return [::String] + def glossary_path project:, location:, glossary: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/glossaries/#{glossary}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified 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. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/metadataJobs/{metadata_job}` + # + # @param project [String] + # @param location [String] + # @param metadata_job [String] + # + # @return [::String] + def metadata_job_path project:, location:, metadata_job: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/metadataJobs/#{metadata_job}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb new file mode 100644 index 000000000000..7ec1cd69f367 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/catalog_service/credentials" +require "google/cloud/dataplex/v1/catalog_service/paths" +require "google/cloud/dataplex/v1/catalog_service/rest/operations" +require "google/cloud/dataplex/v1/catalog_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # The primary resources offered by this service are EntryGroups, EntryTypes, + # AspectTypes, Entries and EntryLinks. They collectively let data + # administrators organize, manage, secure, and catalog data located across + # cloud projects in their organization in a variety of storage systems, + # including Cloud Storage and BigQuery. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/catalog_service/rest" + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + module CatalogService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/catalog_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb new file mode 100644 index 000000000000..c10df4a18cdf --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb @@ -0,0 +1,4182 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/catalog_pb" +require "google/cloud/dataplex/v1/catalog_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + module Rest + ## + # REST client for the CatalogService service. + # + # The primary resources offered by this service are EntryGroups, EntryTypes, + # AspectTypes, Entries and EntryLinks. They collectively let data + # administrators organize, manage, secure, and catalog data located across + # cloud projects in their organization in a variety of storage systems, + # including Cloud Storage and BigQuery. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :catalog_service_stub + + ## + # Configure the CatalogService Client class. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CatalogService clients + # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_entry_type.timeout = 60.0 + + default_config.rpcs.update_entry_type.timeout = 60.0 + + default_config.rpcs.delete_entry_type.timeout = 60.0 + + default_config.rpcs.list_entry_types.timeout = 60.0 + default_config.rpcs.list_entry_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_type.timeout = 60.0 + default_config.rpcs.get_entry_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_aspect_type.timeout = 60.0 + + default_config.rpcs.update_aspect_type.timeout = 60.0 + + default_config.rpcs.delete_aspect_type.timeout = 60.0 + + default_config.rpcs.list_aspect_types.timeout = 60.0 + default_config.rpcs.list_aspect_types.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_aspect_type.timeout = 60.0 + default_config.rpcs.get_aspect_type.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry_group.timeout = 60.0 + + default_config.rpcs.update_entry_group.timeout = 60.0 + + default_config.rpcs.delete_entry_group.timeout = 60.0 + + default_config.rpcs.list_entry_groups.timeout = 60.0 + default_config.rpcs.list_entry_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry_group.timeout = 60.0 + default_config.rpcs.get_entry_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.create_entry.timeout = 60.0 + + default_config.rpcs.update_entry.timeout = 60.0 + default_config.rpcs.update_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.delete_entry.timeout = 60.0 + + default_config.rpcs.list_entries.timeout = 20.0 + default_config.rpcs.list_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_entry.timeout = 20.0 + default_config.rpcs.get_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.lookup_entry.timeout = 20.0 + default_config.rpcs.lookup_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.search_entries.timeout = 60.0 + default_config.rpcs.search_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @catalog_service_stub.universe_domain + end + + ## + # Create a new CatalogService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CatalogService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @catalog_service_stub = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @catalog_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @catalog_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 = @catalog_service_stub.endpoint + config.universe_domain = @catalog_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @catalog_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @catalog_service_stub.logger + end + + # Service calls + + ## + # Creates an EntryType. + # + # @overload create_entry_type(request, options = nil) + # Pass arguments to `create_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) + # Pass arguments to `create_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param entry_type_id [::String] + # Required. EntryType identifier. + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource. + # @param validate_only [::Boolean] + # Optional. 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::CreateEntryTypeRequest.new + # + # # Call the create_entry_type method. + # result = client.create_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry_type.metadata.to_h + + # Set x-goog-api-client, 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_entry_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_entry_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an EntryType. + # + # @overload update_entry_type(request, options = nil) + # Pass arguments to `update_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] + # Required. EntryType Resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. 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::UpdateEntryTypeRequest.new + # + # # Call the update_entry_type method. + # result = client.update_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entry_type.metadata.to_h + + # Set x-goog-api-client, 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_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an EntryType. + # + # @overload delete_entry_type(request, options = nil) + # Pass arguments to `delete_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entry_type(name: nil, etag: nil) + # Pass arguments to `delete_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryTypeRequest method returns an ABORTED error response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new + # + # # Call the delete_entry_type method. + # result = client.delete_entry_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entry_type.metadata.to_h + + # Set x-goog-api-client, 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_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryType resources in a project and location. + # + # @overload list_entry_types(request, options = nil) + # Pass arguments to `list_entry_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the EntryType location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of EntryTypes to return. The service may return + # fewer than this value. If unspecified, the service returns at most 10 + # EntryTypes. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListEntryTypes` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters you provided to `ListEntryTypes` must match the call that + # provided the page token. + # @param filter [::String] + # Optional. Filter request. Filters are case-sensitive. + # The service supports the following formats: + # + # * labels.key1 = "value1" + # * labels:key1 + # * name = "value" + # + # These restrictions can be conjoined with AND, OR, and NOT conjunctions. + # @param order_by [::String] + # Optional. Orders the result by `name` or `create_time` fields. + # 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::EntryType>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new + # + # # Call the list_entry_types method. + # result = client.list_entry_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. + # p item + # end + # + def list_entry_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entry_types.metadata.to_h + + # Set x-goog-api-client, 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_entry_types.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entry_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_entry_types request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entry_types, "entry_types", 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 an EntryType. + # + # @overload get_entry_type(request, options = nil) + # Pass arguments to `get_entry_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entry_type(name: nil) + # Pass arguments to `get_entry_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new + # + # # Call the get_entry_type method. + # result = client.get_entry_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. + # p result + # + def get_entry_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entry_type.metadata.to_h + + # Set x-goog-api-client, 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_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry_type request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an AspectType. + # + # @overload create_aspect_type(request, options = nil) + # Pass arguments to `create_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) + # Pass arguments to `create_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param aspect_type_id [::String] + # Required. AspectType identifier. + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource. + # @param validate_only [::Boolean] + # Optional. 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::CreateAspectTypeRequest.new + # + # # Call the create_aspect_type method. + # result = client.create_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_aspect_type.metadata.to_h + + # Set x-goog-api-client, 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_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_aspect_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an AspectType. + # + # @overload update_aspect_type(request, options = nil) + # Pass arguments to `update_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] + # Required. AspectType Resource + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new + # + # # Call the update_aspect_type method. + # result = client.update_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_aspect_type.metadata.to_h + + # Set x-goog-api-client, 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_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_aspect_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an AspectType. + # + # @overload delete_aspect_type(request, options = nil) + # Pass arguments to `delete_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_aspect_type(name: nil, etag: nil) + # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteAspectTypeRequest method returns an ABORTED error + # response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new + # + # # Call the delete_aspect_type method. + # result = client.delete_aspect_type request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_aspect_type.metadata.to_h + + # Set x-goog-api-client, 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_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_aspect_type request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists AspectType resources in a project and location. + # + # @overload list_aspect_types(request, options = nil) + # Pass arguments to `list_aspect_types` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_aspect_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the AspectType location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of AspectTypes to return. The service may return + # fewer than this value. If unspecified, the service returns at most 10 + # AspectTypes. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListAspectTypes` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters you provide to `ListAspectTypes` must match the call that + # provided the page token. + # @param filter [::String] + # Optional. Filter request. Filters are case-sensitive. + # The service supports the following formats: + # + # * labels.key1 = "value1" + # * labels:key1 + # * name = "value" + # + # These restrictions can be conjoined with AND, OR, and NOT conjunctions. + # @param order_by [::String] + # Optional. Orders the result by `name` or `create_time` fields. + # 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::AspectType>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new + # + # # Call the list_aspect_types method. + # result = client.list_aspect_types request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. + # p item + # end + # + def list_aspect_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_aspect_types.metadata.to_h + + # Set x-goog-api-client, 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_aspect_types.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_aspect_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_aspect_types request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_aspect_types, "aspect_types", 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 an AspectType. + # + # @overload get_aspect_type(request, options = nil) + # Pass arguments to `get_aspect_type` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_aspect_type(name: nil) + # Pass arguments to `get_aspect_type` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new + # + # # Call the get_aspect_type method. + # result = client.get_aspect_type request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. + # p result + # + def get_aspect_type request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_aspect_type.metadata.to_h + + # Set x-goog-api-client, 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_aspect_type.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_aspect_type.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_aspect_type request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an EntryGroup. + # + # @overload create_entry_group(request, options = nil) + # Pass arguments to `create_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) + # Pass arguments to `create_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the entryGroup, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param entry_group_id [::String] + # Required. EntryGroup identifier. + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource. + # @param validate_only [::Boolean] + # Optional. 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::CreateEntryGroupRequest.new + # + # # Call the create_entry_group method. + # result = client.create_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry_group.metadata.to_h + + # Set x-goog-api-client, 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_entry_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_entry_group request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an EntryGroup. + # + # @overload update_entry_group(request, options = nil) + # Pass arguments to `update_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] + # Required. EntryGroup Resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param validate_only [::Boolean] + # Optional. 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::UpdateEntryGroupRequest.new + # + # # Call the update_entry_group method. + # result = client.update_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entry_group.metadata.to_h + + # Set x-goog-api-client, 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_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry_group request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an EntryGroup. + # + # @overload delete_entry_group(request, options = nil) + # Pass arguments to `delete_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entry_group(name: nil, etag: nil) + # Pass arguments to `delete_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryGroupRequest method returns an ABORTED error + # response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new + # + # # Call the delete_entry_group method. + # result = client.delete_entry_group request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entry_group.metadata.to_h + + # Set x-goog-api-client, 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_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry_group request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists EntryGroup resources in a project and location. + # + # @overload list_entry_groups(request, options = nil) + # Pass arguments to `list_entry_groups` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_entry_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the entryGroup location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of EntryGroups to return. The service may return + # fewer than this value. If unspecified, the service returns at most 10 + # EntryGroups. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListEntryGroups` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters you provide to `ListEntryGroups` must match the call that + # provided the page token. + # @param 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::EntryGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new + # + # # Call the list_entry_groups method. + # result = client.list_entry_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. + # p item + # end + # + def list_entry_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entry_groups.metadata.to_h + + # Set x-goog-api-client, 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_entry_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entry_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_entry_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entry_groups, "entry_groups", 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 an EntryGroup. + # + # @overload get_entry_group(request, options = nil) + # Pass arguments to `get_entry_group` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entry_group(name: nil) + # Pass arguments to `get_entry_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new + # + # # Call the get_entry_group method. + # result = client.get_entry_group request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. + # p result + # + def get_entry_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entry_group.metadata.to_h + + # Set x-goog-api-client, 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_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry_group request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an Entry. + # + # @overload create_entry(request, options = nil) + # Pass arguments to `create_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry(parent: nil, entry_id: nil, entry: nil) + # Pass arguments to `create_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param entry_id [::String] + # Required. Entry identifier. It has to be unique within an Entry Group. + # + # Entries corresponding to Google Cloud resources use an Entry ID format + # based on [full resource + # names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + # The format is a full resource name of the resource without the + # prefix double slashes in the API service name part of the full resource + # name. This allows retrieval of entries using their associated resource + # name. + # + # For example, if the full resource name of a resource is + # `//library.googleapis.com/shelves/shelf1/books/book2`, + # then the suggested entry_id is + # `library.googleapis.com/shelves/shelf1/books/book2`. + # + # It is also suggested to follow the same convention for entries + # corresponding to resources from providers or systems other than Google + # Cloud. + # + # The maximum size of the field is 4000 characters. + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new + # + # # Call the create_entry method. + # result = client.create_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def create_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry.metadata.to_h + + # Set x-goog-api-client, 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_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_entry request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an Entry. + # + # @overload update_entry(request, options = nil) + # Pass arguments to `update_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) + # Pass arguments to `update_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] + # Required. Entry resource. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Mask of fields to update. To update Aspects, the update_mask must + # contain the value "aspects". + # + # If the update_mask is empty, the service will update all modifiable fields + # present in the request. + # @param allow_missing [::Boolean] + # Optional. If set to true and the entry doesn't exist, the service will + # create it. + # @param delete_missing_aspects [::Boolean] + # Optional. If set to true and the aspect_keys specify aspect ranges, the + # service deletes any existing aspects from that range that weren't provided + # in the request. + # @param aspect_keys [::Array<::String>] + # Optional. The map keys of the Aspects which the service should modify. It + # supports the following syntaxes: + # + # * `` - matches an aspect of the given type and empty + # path. + # * `@path` - matches an aspect of the given type and + # specified path. For example, to attach an aspect to a field that is + # specified by the `schema` aspect, the path should have the format + # `Schema.`. + # * `@*` - matches aspects of the given type for all + # paths. + # * `*@path` - matches aspects of all types on the given path. + # + # The service will not remove existing aspects matching the syntax unless + # `delete_missing_aspects` is set to true. + # + # If this field is left empty, the service treats it as specifying + # exactly those Aspects present in the request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new + # + # # Call the update_entry method. + # result = client.update_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def update_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entry.metadata.to_h + + # Set x-goog-api-client, 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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.update_entry request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an Entry. + # + # @overload delete_entry(request, options = nil) + # Pass arguments to `delete_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entry(name: nil) + # Pass arguments to `delete_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new + # + # # Call the delete_entry method. + # result = client.delete_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def delete_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entry.metadata.to_h + + # Set x-goog-api-client, 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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.delete_entry request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Entries within an EntryGroup. + # + # @overload list_entries(request, options = nil) + # Pass arguments to `list_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @param page_size [::Integer] + # Optional. Number of items to return per page. If there are remaining + # results, the service returns a next_page_token. If unspecified, the service + # returns at most 10 Entries. The maximum value is 100; values above 100 will + # be coerced to 100. + # @param page_token [::String] + # Optional. Page token received from a previous `ListEntries` call. Provide + # this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter on the entries to return. Filters are case-sensitive. + # You can filter the request by the following fields: + # + # * entry_type + # * entry_source.display_name + # * parent_entry + # + # The comparison operators are =, !=, <, >, <=, >=. The service compares + # strings according to lexical order. + # + # You can use the logical operators AND, OR, NOT in the filter. + # + # You can use Wildcard "*", but for entry_type and parent_entry you need to + # provide the full project id or number. + # + # You cannot use parent_entry in conjunction with other fields. + # + # Example filter expressions: + # + # * "entry_source.display_name=AnExampleDisplayName" + # * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + # * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + # entry_type=projects/another-project/locations/*" + # * "NOT entry_source.display_name=AnotherExampleDisplayName" + # * "parent_entry=projects/example-project/locations/us/entryGroups/example-entry-group/entries/example-entry" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new + # + # # Call the list_entries method. + # result = client.list_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. + # p item + # end + # + def list_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entries.metadata.to_h + + # Set x-goog-api-client, 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_entries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_entries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entries, "entries", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Entry. + # + # @overload get_entry(request, options = nil) + # Pass arguments to `get_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) + # Pass arguments to `get_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View to control which parts of an entry the service should + # return. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # It only works for CUSTOM view. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. It only works for CUSTOM view. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new + # + # # Call the get_entry method. + # result = client.get_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def get_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entry.metadata.to_h + + # Set x-goog-api-client, 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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_entry request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Looks up an entry by name using the permission on the source system. + # + # @overload lookup_entry(request, options = nil) + # Pass arguments to `lookup_entry` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) + # Pass arguments to `lookup_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/{location}`. + # @param view [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View to control which parts of an entry the service should + # return. + # @param aspect_types [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # It only works for CUSTOM view. + # @param paths [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. It only works for CUSTOM view. + # @param entry [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new + # + # # Call the lookup_entry method. + # result = client.lookup_entry request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + # p result + # + def lookup_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_entry.metadata.to_h + + # Set x-goog-api-client, 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.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.lookup_entry request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Searches for Entries matching the given query and scope. + # + # @overload search_entries(request, options = nil) + # Pass arguments to `search_entries` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil, semantic_search: nil) + # Pass arguments to `search_entries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The project to which the request should be attributed in the + # following form: `projects/{project}/locations/global`. + # @param query [::String] + # Required. The query against which entries in scope should be matched. + # The query syntax is defined in [Search syntax for Dataplex Universal + # Catalog](https://cloud.google.com/dataplex/docs/search-syntax). + # @param page_size [::Integer] + # Optional. Number of results in the search page. If <=0, then defaults + # to 10. Max limit for page_size is 1000. Throws an invalid argument for + # page_size > 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `SearchEntries` call. Provide + # this to retrieve the subsequent page. + # @param order_by [::String] + # Optional. Specifies the ordering of results. + # Supported values are: + # + # * `relevance` + # * `last_modified_timestamp` + # * `last_modified_timestamp asc` + # @param scope [::String] + # Optional. The scope under which the search should be operating. It must + # either be `organizations/` or `projects/`. If it is + # unspecified, it defaults to the organization where the project provided in + # `name` is located. + # @param semantic_search [::Boolean] + # Optional. Specifies whether the search should understand the meaning and + # intent behind the query, rather than just matching keywords. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new + # + # # Call the search_entries method. + # result = client.search_entries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. + # p item + # end + # + def search_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_entries.metadata.to_h + + # Set x-goog-api-client, 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.search_entries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.search_entries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :search_entries, "results", 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 + + ## + # Creates a metadata job. For example, use a metadata job to import metadata + # from a third-party system into Dataplex Universal Catalog. + # + # @overload create_metadata_job(request, options = nil) + # Pass arguments to `create_metadata_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_job(parent: nil, metadata_job: nil, metadata_job_id: nil, validate_only: nil) + # Pass arguments to `create_metadata_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent location, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @param metadata_job [::Google::Cloud::Dataplex::V1::MetadataJob, ::Hash] + # Required. The metadata job resource. + # @param metadata_job_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::CreateMetadataJobRequest.new + # + # # Call the create_metadata_job method. + # result = client.create_metadata_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest + + # Converts hash and nil to an 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_job.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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_metadata_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_metadata_job 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 metadata job. + # + # @overload get_metadata_job(request, options = nil) + # Pass arguments to `get_metadata_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetMetadataJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_job(name: nil) + # Pass arguments to `get_metadata_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the metadata job, in the format + # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::MetadataJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::MetadataJob] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::GetMetadataJobRequest.new + # + # # Call the get_metadata_job method. + # result = client.get_metadata_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataJob. + # p result + # + def get_metadata_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest + + # Converts hash and nil to an 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_metadata_job.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_metadata_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_metadata_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.get_metadata_job 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 metadata jobs. + # + # @overload list_metadata_jobs(request, options = nil) + # Pass arguments to `list_metadata_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_metadata_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent location, in the format + # `projects/{project_id_or_number}/locations/{location_id}` + # @param page_size [::Integer] + # Optional. The maximum number of metadata jobs to return. The service might + # return fewer jobs than this value. If unspecified, at most 10 jobs are + # returned. The maximum value is 1,000. + # @param page_token [::String] + # Optional. The page token received from a previous `ListMetadataJobs` call. + # Provide this token to retrieve the subsequent page of results. When + # paginating, all other parameters that are provided to the + # `ListMetadataJobs` request must match the call that provided the page + # token. + # @param 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::MetadataJob>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::MetadataJob>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::ListMetadataJobsRequest.new + # + # # Call the list_metadata_jobs method. + # result = client.list_metadata_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataJob. + # p item + # end + # + def list_metadata_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest + + # Converts hash and nil to an 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_jobs.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_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_metadata_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.list_metadata_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_metadata_jobs, "metadata_jobs", 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 + + ## + # Cancels a metadata job. + # + # If you cancel a metadata import job that is in progress, the changes in the + # job might be partially applied. We recommend that you reset the state of + # the entry groups in your project by running another metadata job that + # reverts the changes from the canceled job. + # + # @overload cancel_metadata_job(request, options = nil) + # Pass arguments to `cancel_metadata_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_metadata_job(name: nil) + # Pass arguments to `cancel_metadata_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job, in the format + # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new + # + # # Call the cancel_metadata_job method. + # result = client.cancel_metadata_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_metadata_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest + + # Converts hash and nil to an 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_metadata_job.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_metadata_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_metadata_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.cancel_metadata_job 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 an Entry Link. + # + # @overload create_entry_link(request, options = nil) + # Pass arguments to `create_entry_link` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entry_link(parent: nil, entry_link_id: nil, entry_link: nil) + # Pass arguments to `create_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 parent [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @param entry_link_id [::String] + # Required. Entry Link 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 EntryGroup. + # @param entry_link [::Google::Cloud::Dataplex::V1::EntryLink, ::Hash] + # Required. Entry Link resource. + # @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::CreateEntryLinkRequest.new + # + # # Call the create_entry_link method. + # result = client.create_entry_link request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + # p result + # + def create_entry_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entry_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.create_entry_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entry_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @catalog_service_stub.create_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 + + ## + # 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. + # + # @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::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 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 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::MetadataFeed] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::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::GetMetadataFeedRequest.new + # + # # Call the get_metadata_feed method. + # result = client.get_metadata_feed request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataFeed. + # p result + # + 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::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.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 \ + lib_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_metadata_feed.timeout, + metadata: call_metadata, + 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.get_metadata_feed 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 + + ## + # Retrieve a list of MetadataFeeds. + # + # @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::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 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 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 [::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::DeleteMetadataFeedRequest.new + # + # # 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. + # # Here is how 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_metadata_feed request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + 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.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 \ + lib_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_metadata_feed.timeout, + metadata: call_metadata, + 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.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) + end + + ## + # Configuration class for the CatalogService REST API. + # + # This class represents the configuration for CatalogService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entry_type to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entry_type.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # 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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + 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 CatalogService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_type + ## + # RPC-specific configuration for `update_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_type + ## + # RPC-specific configuration for `delete_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_type + ## + # RPC-specific configuration for `list_entry_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_types + ## + # RPC-specific configuration for `get_entry_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_type + ## + # RPC-specific configuration for `create_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :create_aspect_type + ## + # RPC-specific configuration for `update_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :update_aspect_type + ## + # RPC-specific configuration for `delete_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_aspect_type + ## + # RPC-specific configuration for `list_aspect_types` + # @return [::Gapic::Config::Method] + # + attr_reader :list_aspect_types + ## + # RPC-specific configuration for `get_aspect_type` + # @return [::Gapic::Config::Method] + # + attr_reader :get_aspect_type + ## + # RPC-specific configuration for `create_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry_group + ## + # RPC-specific configuration for `update_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry_group + ## + # RPC-specific configuration for `delete_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry_group + ## + # RPC-specific configuration for `list_entry_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entry_groups + ## + # RPC-specific configuration for `get_entry_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry_group + ## + # RPC-specific configuration for `create_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entry + ## + # RPC-specific configuration for `update_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entry + ## + # RPC-specific configuration for `delete_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entry + ## + # RPC-specific configuration for `list_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entries + ## + # RPC-specific configuration for `get_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entry + ## + # RPC-specific configuration for `lookup_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entry + ## + # RPC-specific configuration for `search_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :search_entries + ## + # RPC-specific configuration for `create_metadata_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_metadata_job + ## + # RPC-specific configuration for `get_metadata_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_metadata_job + ## + # RPC-specific configuration for `list_metadata_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_metadata_jobs + ## + # RPC-specific configuration for `cancel_metadata_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_metadata_job + ## + # RPC-specific configuration for `create_entry_link` + # @return [::Gapic::Config::Method] + # + 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 + create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type + @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config + update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type + @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config + delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type + @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config + list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types + @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config + get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type + @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config + create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type + @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config + update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type + @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config + delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type + @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config + list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types + @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config + get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type + @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config + create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group + @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config + update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group + @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config + delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group + @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config + list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups + @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config + get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group + @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config + create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry + @create_entry = ::Gapic::Config::Method.new create_entry_config + update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry + @update_entry = ::Gapic::Config::Method.new update_entry_config + delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry + @delete_entry = ::Gapic::Config::Method.new delete_entry_config + list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries + @list_entries = ::Gapic::Config::Method.new list_entries_config + get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry + @get_entry = ::Gapic::Config::Method.new get_entry_config + lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry + @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config + search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries + @search_entries = ::Gapic::Config::Method.new search_entries_config + create_metadata_job_config = parent_rpcs.create_metadata_job if parent_rpcs.respond_to? :create_metadata_job + @create_metadata_job = ::Gapic::Config::Method.new create_metadata_job_config + get_metadata_job_config = parent_rpcs.get_metadata_job if parent_rpcs.respond_to? :get_metadata_job + @get_metadata_job = ::Gapic::Config::Method.new get_metadata_job_config + list_metadata_jobs_config = parent_rpcs.list_metadata_jobs if parent_rpcs.respond_to? :list_metadata_jobs + @list_metadata_jobs = ::Gapic::Config::Method.new list_metadata_jobs_config + cancel_metadata_job_config = parent_rpcs.cancel_metadata_job if parent_rpcs.respond_to? :cancel_metadata_job + @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 + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb new file mode 100644 index 000000000000..5ccbb965a76f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_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 CatalogService + 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 CatalogService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CatalogService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb new file mode 100644 index 000000000000..3d56ba952381 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb @@ -0,0 +1,2353 @@ +# 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 "google/cloud/dataplex/v1/catalog_pb" + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + module Rest + ## + # REST service stub for the CatalogService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_entry_type", + 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_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_entry_type", + 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_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_entry_type", + 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_entry_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] + # A result object deserialized from the server's reply + def list_entry_types request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_types_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_entry_types", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.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_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # A result object deserialized from the server's reply + def get_entry_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_entry_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::EntryType.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_aspect_type", + 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_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_aspect_type", + 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_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_aspect_type", + 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_aspect_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] + # A result object deserialized from the server's reply + def list_aspect_types request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_aspect_types_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_aspect_types", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.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_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # A result object deserialized from the server's reply + def get_aspect_type request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_aspect_type_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_aspect_type", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::AspectType.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_entry_group", + 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_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_entry_group", + 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_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_entry_group", + 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_entry_groups REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] + # A result object deserialized from the server's reply + def list_entry_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_entry_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.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_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # A result object deserialized from the server's reply + def get_entry_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_entry_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::EntryGroup.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def create_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.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_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def update_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.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 REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def delete_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.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_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntriesResponse] + # A result object deserialized from the server's reply + def list_entries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_entries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.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 REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def get_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.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_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entry] + # A result object deserialized from the server's reply + def lookup_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_entry_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lookup_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] + # A result object deserialized from the server's reply + def search_entries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_entries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "search_entries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_metadata_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_metadata_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_metadata_job", + 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_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetMetadataJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::MetadataJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::MetadataJob] + # A result object deserialized from the server's reply + def get_metadata_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_metadata_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_metadata_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::MetadataJob.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_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::ListMetadataJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse] + # A result object deserialized from the server's reply + def list_metadata_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_metadata_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_metadata_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse.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_metadata_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_metadata_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_metadata_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_metadata_job", + 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 create_entry_link REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 create_entry_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_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: "create_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 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 + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 delete_entry_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_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 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 + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 get_entry_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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: "get_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 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 + # + # GRPC transcoding helper method for the create_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entryTypes", + body: "entry_type", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry_type.name}", + body: "entry_type", + matches: [ + ["entry_type.name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entry_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entry_types_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entryTypes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entry_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/aspectTypes", + body: "aspect_type", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{aspect_type.name}", + body: "aspect_type", + matches: [ + ["aspect_type.name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_aspect_types REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_aspect_types_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/aspectTypes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_aspect_type REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_aspect_type_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entryGroups", + body: "entry_group", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry_group.name}", + body: "entry_group", + matches: [ + ["entry_group.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entry_groups REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entry_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entryGroups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entry_group REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entries", + body: "entry", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{entry.name}", + body: "entry", + matches: [ + ["entry.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_entry REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:lookupEntry", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_entries REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_entries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:searchEntries", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_metadata_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/metadataJobs", + body: "metadata_job", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_metadata_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetMetadataJobRequest] + # 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_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataJobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_metadata_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest] + # 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_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/metadataJobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_metadata_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest] + # 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_metadata_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/metadataJobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entry_link REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entry_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entryLinks", + body: "entry_link", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] + ] + ) + 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 + # + # GRPC transcoding helper method for the delete_entry_link REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entry_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entryLinks/[^/]+/?$}, false] + ] + ) + 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 + # + # GRPC transcoding helper method for the get_entry_link REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryLinkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entry_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entryLinks/[^/]+/?$}, false] + ] + ) + 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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb new file mode 100644 index 000000000000..6503017a33da --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb @@ -0,0 +1,127 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/catalog.proto for package 'Google.Cloud.Dataplex.V1' +# Original file comments: +# Copyright 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/catalog_pb' + +module Google + module Cloud + module Dataplex + module V1 + module CatalogService + # The primary resources offered by this service are EntryGroups, EntryTypes, + # AspectTypes, Entries and EntryLinks. They collectively let data + # administrators organize, manage, secure, and catalog data located across + # cloud projects in their organization in a variety of storage systems, + # including Cloud Storage and BigQuery. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.CatalogService' + + # Creates an EntryType. + rpc :CreateEntryType, ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Google::Longrunning::Operation + # Updates an EntryType. + rpc :UpdateEntryType, ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Google::Longrunning::Operation + # Deletes an EntryType. + rpc :DeleteEntryType, ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Google::Longrunning::Operation + # Lists EntryType resources in a project and location. + rpc :ListEntryTypes, ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse + # Gets an EntryType. + rpc :GetEntryType, ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Google::Cloud::Dataplex::V1::EntryType + # Creates an AspectType. + rpc :CreateAspectType, ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Google::Longrunning::Operation + # Updates an AspectType. + rpc :UpdateAspectType, ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Google::Longrunning::Operation + # Deletes an AspectType. + rpc :DeleteAspectType, ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Google::Longrunning::Operation + # Lists AspectType resources in a project and location. + rpc :ListAspectTypes, ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse + # Gets an AspectType. + rpc :GetAspectType, ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Google::Cloud::Dataplex::V1::AspectType + # Creates an EntryGroup. + rpc :CreateEntryGroup, ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Google::Longrunning::Operation + # Updates an EntryGroup. + rpc :UpdateEntryGroup, ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Google::Longrunning::Operation + # Deletes an EntryGroup. + rpc :DeleteEntryGroup, ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Google::Longrunning::Operation + # Lists EntryGroup resources in a project and location. + rpc :ListEntryGroups, ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse + # Gets an EntryGroup. + rpc :GetEntryGroup, ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Google::Cloud::Dataplex::V1::EntryGroup + # Creates an Entry. + rpc :CreateEntry, ::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Updates an Entry. + rpc :UpdateEntry, ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Deletes an Entry. + rpc :DeleteEntry, ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Google::Cloud::Dataplex::V1::Entry + # Lists Entries within an EntryGroup. + rpc :ListEntries, ::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Google::Cloud::Dataplex::V1::ListEntriesResponse + # Gets an Entry. + 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. + 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 + # Creates a metadata job. For example, use a metadata job to import metadata + # from a third-party system into Dataplex Universal Catalog. + rpc :CreateMetadataJob, ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, ::Google::Longrunning::Operation + # Gets a metadata job. + rpc :GetMetadataJob, ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, ::Google::Cloud::Dataplex::V1::MetadataJob + # Lists metadata jobs. + rpc :ListMetadataJobs, ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, ::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse + # Cancels a metadata job. + # + # If you cancel a metadata import job that is in progress, the changes in the + # job might be partially applied. We recommend that you reset the state of + # the entry groups in your project by running another metadata job that + # reverts the changes from the canceled job. + rpc :CancelMetadataJob, ::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 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb new file mode 100644 index 000000000000..e565b64a7f22 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/cmek.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/service_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EncryptionConfig").msgclass + EncryptionConfig::FailureDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EncryptionConfig.FailureDetails").msgclass + EncryptionConfig::FailureDetails::ErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EncryptionConfig.FailureDetails.ErrorCode").enummodule + EncryptionConfig::EncryptionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EncryptionConfig.EncryptionState").enummodule + CreateEncryptionConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEncryptionConfigRequest").msgclass + GetEncryptionConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEncryptionConfigRequest").msgclass + UpdateEncryptionConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEncryptionConfigRequest").msgclass + DeleteEncryptionConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEncryptionConfigRequest").msgclass + ListEncryptionConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEncryptionConfigsRequest").msgclass + ListEncryptionConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEncryptionConfigsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service.rb new file mode 100644 index 000000000000..11b6c0ce1cbb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service.rb @@ -0,0 +1,56 @@ +# 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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/cmek_service/credentials" +require "google/cloud/dataplex/v1/cmek_service/paths" +require "google/cloud/dataplex/v1/cmek_service/operations" +require "google/cloud/dataplex/v1/cmek_service/client" +require "google/cloud/dataplex/v1/cmek_service/rest" + +module Google + module Cloud + module Dataplex + module V1 + ## + # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/cmek_service" + # client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/cmek_service/rest" + # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new + # + module CmekService + end + end + end + end +end + +helper_path = ::File.join __dir__, "cmek_service", "helpers.rb" +require "google/cloud/dataplex/v1/cmek_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/client.rb new file mode 100644 index 000000000000..cd4673362ec5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/client.rb @@ -0,0 +1,961 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/cmek_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module CmekService + ## + # Client for the CmekService service. + # + # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cmek_service_stub + + ## + # Configure the CmekService Client class. + # + # See {::Google::Cloud::Dataplex::V1::CmekService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CmekService clients + # ::Google::Cloud::Dataplex::V1::CmekService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CmekService 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::CmekService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cmek_service_stub.universe_domain + end + + ## + # Create a new CmekService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CmekService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/cmek_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @cmek_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::CmekService::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, + logger: @config.logger + ) + + @cmek_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @cmek_service_stub.endpoint + config.universe_domain = @cmek_service_stub.universe_domain + config.logger = @cmek_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @cmek_service_stub.endpoint + config.universe_domain = @cmek_service_stub.universe_domain + config.logger = @cmek_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::CmekService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cmek_service_stub.logger + end + + # Service calls + + ## + # Create an EncryptionConfig. + # + # @overload create_encryption_config(request, options = nil) + # Pass arguments to `create_encryption_config` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_config(parent: nil, encryption_config_id: nil, encryption_config: nil) + # Pass arguments to `create_encryption_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The location at which the EncryptionConfig is to be created. + # @param encryption_config_id [::String] + # Required. The ID of the + # {::Google::Cloud::Dataplex::V1::EncryptionConfig EncryptionConfig} to create. + # Currently, only a value of "default" is supported. + # @param encryption_config [::Google::Cloud::Dataplex::V1::EncryptionConfig, ::Hash] + # Required. The EncryptionConfig to create. + # + # @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::CmekService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new + # + # # Call the create_encryption_config method. + # result = client.create_encryption_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_encryption_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest + + # Converts hash and nil to 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_encryption_config.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_encryption_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_encryption_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.call_rpc :create_encryption_config, 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 an EncryptionConfig. + # + # @overload update_encryption_config(request, options = nil) + # Pass arguments to `update_encryption_config` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_config(encryption_config: nil, update_mask: nil) + # Pass arguments to `update_encryption_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param encryption_config [::Google::Cloud::Dataplex::V1::EncryptionConfig, ::Hash] + # Required. The EncryptionConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Mask of fields to update. + # The service treats an omitted field mask as an implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # + # @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::CmekService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new + # + # # Call the update_encryption_config method. + # result = client.update_encryption_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_encryption_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest + + # Converts hash and nil to 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_encryption_config.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.encryption_config&.name + header_params["encryption_config.name"] = request.encryption_config.name + end + + request_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_encryption_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_encryption_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.call_rpc :update_encryption_config, 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 an EncryptionConfig. + # + # @overload delete_encryption_config(request, options = nil) + # Pass arguments to `delete_encryption_config` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_config(name: nil, etag: nil) + # Pass arguments to `delete_encryption_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 EncryptionConfig to delete. + # @param etag [::String] + # Optional. Etag of the EncryptionConfig. This is a strong etag. + # + # @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::CmekService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new + # + # # Call the delete_encryption_config method. + # result = client.delete_encryption_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_encryption_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest + + # Converts hash and nil to 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_encryption_config.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_encryption_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_encryption_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.call_rpc :delete_encryption_config, 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 + + ## + # List EncryptionConfigs. + # + # @overload list_encryption_configs(request, options = nil) + # Pass arguments to `list_encryption_configs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_encryption_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The location for which the EncryptionConfig is to be listed. + # @param page_size [::Integer] + # Optional. Maximum number of EncryptionConfigs to return. The service may + # return fewer than this value. If unspecified, at most 10 EncryptionConfigs + # 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 `ListEncryptionConfigs` call. + # Provide this to retrieve the subsequent page. When paginating, the + # parameters - filter and order_by provided to `ListEncryptionConfigs` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. Filter the EncryptionConfigs to be returned. + # Using bare literals: (These values will be matched anywhere it may appear + # in the object's field values) + # * filter=some_value + # Using fields: (These values will be matched only in the specified field) + # * filter=some_field=some_value + # Supported fields: + # * name, key, create_time, update_time, encryption_state + # Example: + # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config + # conjunctions: (AND, OR, NOT) + # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config + # AND mode=CMEK + # logical operators: (>, <, >=, <=, !=, =, :), + # * filter=create_time>2024-05-01T00:00:00.000Z + # @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::EncryptionConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EncryptionConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CmekService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.new + # + # # Call the list_encryption_configs method. + # result = client.list_encryption_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EncryptionConfig. + # p item + # end + # + def list_encryption_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest + + # Converts hash and nil to 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_encryption_configs.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_encryption_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_encryption_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.call_rpc :list_encryption_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cmek_service_stub, :list_encryption_configs, 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 an EncryptionConfig. + # + # @overload get_encryption_config(request, options = nil) + # Pass arguments to `get_encryption_config` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_config(name: nil) + # Pass arguments to `get_encryption_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 EncryptionConfig to fetch. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::EncryptionConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CmekService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new + # + # # Call the get_encryption_config method. + # result = client.get_encryption_config request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EncryptionConfig. + # p result + # + def get_encryption_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest + + # Converts hash and nil to 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_encryption_config.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_encryption_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_encryption_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.call_rpc :get_encryption_config, 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 + + ## + # Configuration class for the CmekService API. + # + # This class represents the configuration for CmekService, + # 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::CmekService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_encryption_config to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::CmekService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_encryption_config.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_encryption_config.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::Cloud::Dataplex::V1::CmekService::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 CmekService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_encryption_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_encryption_config + ## + # RPC-specific configuration for `update_encryption_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_encryption_config + ## + # RPC-specific configuration for `delete_encryption_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_encryption_config + ## + # RPC-specific configuration for `list_encryption_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_encryption_configs + ## + # RPC-specific configuration for `get_encryption_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_encryption_config + + # @private + def initialize parent_rpcs = nil + create_encryption_config_config = parent_rpcs.create_encryption_config if parent_rpcs.respond_to? :create_encryption_config + @create_encryption_config = ::Gapic::Config::Method.new create_encryption_config_config + update_encryption_config_config = parent_rpcs.update_encryption_config if parent_rpcs.respond_to? :update_encryption_config + @update_encryption_config = ::Gapic::Config::Method.new update_encryption_config_config + delete_encryption_config_config = parent_rpcs.delete_encryption_config if parent_rpcs.respond_to? :delete_encryption_config + @delete_encryption_config = ::Gapic::Config::Method.new delete_encryption_config_config + list_encryption_configs_config = parent_rpcs.list_encryption_configs if parent_rpcs.respond_to? :list_encryption_configs + @list_encryption_configs = ::Gapic::Config::Method.new list_encryption_configs_config + get_encryption_config_config = parent_rpcs.get_encryption_config if parent_rpcs.respond_to? :get_encryption_config + @get_encryption_config = ::Gapic::Config::Method.new get_encryption_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/credentials.rb new file mode 100644 index 000000000000..b1430ecaa9b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module CmekService + # Credentials for the CmekService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/operations.rb new file mode 100644 index 000000000000..c061e274d80b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_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 CmekService + # 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 CmekService 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 CmekService 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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/paths.rb new file mode 100644 index 000000000000..8cd932842b1f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/paths.rb @@ -0,0 +1,69 @@ +# 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 + module CmekService + # Path helper methods for the CmekService API. + module Paths + ## + # Create a fully-qualified EncryptionConfig resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/encryptionConfigs/{encryption_config}` + # + # @param organization [String] + # @param location [String] + # @param encryption_config [String] + # + # @return [::String] + def encryption_config_path organization:, location:, encryption_config: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/encryptionConfigs/#{encryption_config}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest.rb new file mode 100644 index 000000000000..4efa8c9c5af5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest.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! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/cmek_service/credentials" +require "google/cloud/dataplex/v1/cmek_service/paths" +require "google/cloud/dataplex/v1/cmek_service/rest/operations" +require "google/cloud/dataplex/v1/cmek_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/cmek_service/rest" + # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new + # + module CmekService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/cmek_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb new file mode 100644 index 000000000000..5f8f6b329ef7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb @@ -0,0 +1,892 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/cmek_pb" +require "google/cloud/dataplex/v1/cmek_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module CmekService + module Rest + ## + # REST client for the CmekService service. + # + # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cmek_service_stub + + ## + # Configure the CmekService Client class. + # + # See {::Google::Cloud::Dataplex::V1::CmekService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CmekService clients + # ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CmekService 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::CmekService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cmek_service_stub.universe_domain + end + + ## + # Create a new CmekService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CmekService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::CmekService::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 + + @cmek_service_stub = ::Google::Cloud::Dataplex::V1::CmekService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cmek_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @cmek_service_stub.endpoint + config.universe_domain = @cmek_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @cmek_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 = @cmek_service_stub.endpoint + config.universe_domain = @cmek_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @cmek_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::CmekService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cmek_service_stub.logger + end + + # Service calls + + ## + # Create an EncryptionConfig. + # + # @overload create_encryption_config(request, options = nil) + # Pass arguments to `create_encryption_config` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_config(parent: nil, encryption_config_id: nil, encryption_config: nil) + # Pass arguments to `create_encryption_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The location at which the EncryptionConfig is to be created. + # @param encryption_config_id [::String] + # Required. The ID of the + # {::Google::Cloud::Dataplex::V1::EncryptionConfig EncryptionConfig} to create. + # Currently, only a value of "default" is supported. + # @param encryption_config [::Google::Cloud::Dataplex::V1::EncryptionConfig, ::Hash] + # Required. The EncryptionConfig to create. + # @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::CmekService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new + # + # # Call the create_encryption_config method. + # result = client.create_encryption_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_encryption_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest + + # Converts hash and nil to an 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_encryption_config.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_encryption_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_encryption_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.create_encryption_config 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 an EncryptionConfig. + # + # @overload update_encryption_config(request, options = nil) + # Pass arguments to `update_encryption_config` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_config(encryption_config: nil, update_mask: nil) + # Pass arguments to `update_encryption_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param encryption_config [::Google::Cloud::Dataplex::V1::EncryptionConfig, ::Hash] + # Required. The EncryptionConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Mask of fields to update. + # The service treats an omitted field mask as an implied field mask + # equivalent to all fields that are populated (have a non-empty value). + # @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::CmekService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new + # + # # Call the update_encryption_config method. + # result = client.update_encryption_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_encryption_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest + + # Converts hash and nil to an 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_encryption_config.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_encryption_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_encryption_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.update_encryption_config 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 an EncryptionConfig. + # + # @overload delete_encryption_config(request, options = nil) + # Pass arguments to `delete_encryption_config` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_config(name: nil, etag: nil) + # Pass arguments to `delete_encryption_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 EncryptionConfig to delete. + # @param etag [::String] + # Optional. Etag of the EncryptionConfig. This is a strong etag. + # @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::CmekService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new + # + # # Call the delete_encryption_config method. + # result = client.delete_encryption_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_encryption_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest + + # Converts hash and nil to an 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_encryption_config.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_encryption_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_encryption_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.delete_encryption_config 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 + + ## + # List EncryptionConfigs. + # + # @overload list_encryption_configs(request, options = nil) + # Pass arguments to `list_encryption_configs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_encryption_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The location for which the EncryptionConfig is to be listed. + # @param page_size [::Integer] + # Optional. Maximum number of EncryptionConfigs to return. The service may + # return fewer than this value. If unspecified, at most 10 EncryptionConfigs + # 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 `ListEncryptionConfigs` call. + # Provide this to retrieve the subsequent page. When paginating, the + # parameters - filter and order_by provided to `ListEncryptionConfigs` must + # match the call that provided the page token. + # @param filter [::String] + # Optional. Filter the EncryptionConfigs to be returned. + # Using bare literals: (These values will be matched anywhere it may appear + # in the object's field values) + # * filter=some_value + # Using fields: (These values will be matched only in the specified field) + # * filter=some_field=some_value + # Supported fields: + # * name, key, create_time, update_time, encryption_state + # Example: + # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config + # conjunctions: (AND, OR, NOT) + # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config + # AND mode=CMEK + # logical operators: (>, <, >=, <=, !=, =, :), + # * filter=create_time>2024-05-01T00:00:00.000Z + # @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::EncryptionConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::EncryptionConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.new + # + # # Call the list_encryption_configs method. + # result = client.list_encryption_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::EncryptionConfig. + # p item + # end + # + def list_encryption_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest + + # Converts hash and nil to an 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_encryption_configs.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_encryption_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_encryption_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.list_encryption_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cmek_service_stub, :list_encryption_configs, "encryption_configs", 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 an EncryptionConfig. + # + # @overload get_encryption_config(request, options = nil) + # Pass arguments to `get_encryption_config` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_encryption_config(name: nil) + # Pass arguments to `get_encryption_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 EncryptionConfig to fetch. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::EncryptionConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new + # + # # Call the get_encryption_config method. + # result = client.get_encryption_config request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::EncryptionConfig. + # p result + # + def get_encryption_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest + + # Converts hash and nil to an 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_encryption_config.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_encryption_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_encryption_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cmek_service_stub.get_encryption_config 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 CmekService REST API. + # + # This class represents the configuration for CmekService 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::CmekService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_encryption_config to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_encryption_config.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_encryption_config.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + 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 CmekService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_encryption_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_encryption_config + ## + # RPC-specific configuration for `update_encryption_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_encryption_config + ## + # RPC-specific configuration for `delete_encryption_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_encryption_config + ## + # RPC-specific configuration for `list_encryption_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_encryption_configs + ## + # RPC-specific configuration for `get_encryption_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_encryption_config + + # @private + def initialize parent_rpcs = nil + create_encryption_config_config = parent_rpcs.create_encryption_config if parent_rpcs.respond_to? :create_encryption_config + @create_encryption_config = ::Gapic::Config::Method.new create_encryption_config_config + update_encryption_config_config = parent_rpcs.update_encryption_config if parent_rpcs.respond_to? :update_encryption_config + @update_encryption_config = ::Gapic::Config::Method.new update_encryption_config_config + delete_encryption_config_config = parent_rpcs.delete_encryption_config if parent_rpcs.respond_to? :delete_encryption_config + @delete_encryption_config = ::Gapic::Config::Method.new delete_encryption_config_config + list_encryption_configs_config = parent_rpcs.list_encryption_configs if parent_rpcs.respond_to? :list_encryption_configs + @list_encryption_configs = ::Gapic::Config::Method.new list_encryption_configs_config + get_encryption_config_config = parent_rpcs.get_encryption_config if parent_rpcs.respond_to? :get_encryption_config + @get_encryption_config = ::Gapic::Config::Method.new get_encryption_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/operations.rb new file mode 100644 index 000000000000..76bfe5b25e8b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_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 CmekService + 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 CmekService 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 CmekService 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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/service_stub.rb new file mode 100644 index 000000000000..f06595e11b90 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/service_stub.rb @@ -0,0 +1,388 @@ +# 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 "google/cloud/dataplex/v1/cmek_pb" + +module Google + module Cloud + module Dataplex + module V1 + module CmekService + module Rest + ## + # REST service stub for the CmekService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_encryption_config REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_encryption_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_encryption_config_request request_pb + query_string_params = if query_string_params.any? + query_string_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_encryption_config", + 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_encryption_config REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_encryption_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_encryption_config_request request_pb + query_string_params = if query_string_params.any? + query_string_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_encryption_config", + 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_encryption_config REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_encryption_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_encryption_config_request request_pb + query_string_params = if query_string_params.any? + query_string_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_encryption_config", + 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_encryption_configs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::ListEncryptionConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse] + # A result object deserialized from the server's reply + def list_encryption_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_encryption_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_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_encryption_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse.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_encryption_config REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::EncryptionConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] + # A result object deserialized from the server's reply + def get_encryption_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_encryption_config_request request_pb + query_string_params = if query_string_params.any? + query_string_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_encryption_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::EncryptionConfig.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 create_encryption_config REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest] + # 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_encryption_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/encryptionConfigs", + body: "encryption_config", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_encryption_config REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest] + # 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_encryption_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{encryption_config.name}", + body: "encryption_config", + matches: [ + ["encryption_config.name", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_encryption_config REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest] + # 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_encryption_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_encryption_configs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest] + # 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_encryption_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/encryptionConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_encryption_config REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest] + # 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_encryption_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_services_pb.rb new file mode 100644 index 000000000000..429355a041cd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_services_pb.rb @@ -0,0 +1,53 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/cmek.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/cmek_pb' + +module Google + module Cloud + module Dataplex + module V1 + module CmekService + # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.CmekService' + + # Create an EncryptionConfig. + rpc :CreateEncryptionConfig, ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest, ::Google::Longrunning::Operation + # Update an EncryptionConfig. + rpc :UpdateEncryptionConfig, ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest, ::Google::Longrunning::Operation + # Delete an EncryptionConfig. + rpc :DeleteEncryptionConfig, ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest, ::Google::Longrunning::Operation + # List EncryptionConfigs. + rpc :ListEncryptionConfigs, ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest, ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse + # Get an EncryptionConfig. + rpc :GetEncryptionConfig, ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest, ::Google::Cloud::Dataplex::V1::EncryptionConfig + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb new file mode 100644 index 000000000000..78c3076cb22a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/content.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +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.proto2,\n\x0e\x43ontentService\x1a\x1a\xca\x41\x17\x64\x61taplex.googleapis.comBh\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43ontentProtoP\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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb new file mode 100644 index 000000000000..ebfc5728819c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb @@ -0,0 +1,49 @@ +# 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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/content_service/credentials" +require "google/cloud/dataplex/v1/content_service/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # ContentService manages Notebook and SQL Scripts for Dataplex Universal + # Catalog. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/content_service" + # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new + # + module ContentService + end + end + end + end +end + +helper_path = ::File.join __dir__, "content_service", "helpers.rb" +require "google/cloud/dataplex/v1/content_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb new file mode 100644 index 000000000000..9b0eec675d7d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb @@ -0,0 +1,395 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/content_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + ## + # Client for the ContentService service. + # + # ContentService manages Notebook and SQL Scripts for Dataplex Universal + # Catalog. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :content_service_stub + + ## + # Configure the ContentService Client class. + # + # See {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ContentService clients + # ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ContentService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @content_service_stub.universe_domain + end + + ## + # Create a new ContentService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ContentService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/content_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @content_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::ContentService::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, + logger: @config.logger + ) + + @content_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::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.logger = @content_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::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.logger = @content_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @content_service_stub.logger + end + + # Service calls + + ## + # Configuration class for the ContentService API. + # + # This class represents the configuration for ContentService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @!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::Cloud::Dataplex::V1::ContentService::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 ContentService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + # @private + def initialize _parent_rpcs = nil + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb new file mode 100644 index 000000000000..cdfe7c3b7aa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb @@ -0,0 +1,44 @@ +# 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 "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module ContentService + # Credentials for the ContentService API. + class Credentials < ::Google::Auth::Credentials + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb new file mode 100644 index 000000000000..9af3c1dddcda --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb @@ -0,0 +1,29 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/content.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 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/content_pb' + +module Google + module Cloud + module Dataplex + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb new file mode 100644 index 000000000000..3189565cefed --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_discovery.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n-google/cloud/dataplex/v1/data_discovery.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xcb\x08\n\x11\x44\x61taDiscoverySpec\x12m\n\x1a\x62igquery_publishing_config\x18\x01 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfigB\x03\xe0\x41\x01\x12S\n\x0estorage_config\x18\x64 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfigH\x00\x1a\xee\x02\n\x18\x42igQueryPublishingConfig\x12g\n\ntable_type\x18\x02 \x01(\x0e\x32N.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableTypeB\x03\xe0\x41\x01\x12H\n\nconnection\x18\x03 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,bigqueryconnection.googleapis.com/Connection\x12\x15\n\x08location\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x07project\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\"B\n\tTableType\x12\x1a\n\x16TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45XTERNAL\x10\x01\x12\x0b\n\x07\x42IGLAKE\x10\x02\x1a\xed\x03\n\rStorageConfig\x12\x1d\n\x10include_patterns\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12^\n\x0b\x63sv_options\x18\x03 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptionsB\x03\xe0\x41\x01\x12`\n\x0cjson_options\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptionsB\x03\xe0\x41\x01\x1a\x8f\x01\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\x17type_inference_disabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05quote\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1aJ\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17type_inference_disabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\x11\n\x0fresource_config\"\xb7\x04\n\x13\x44\x61taDiscoveryResult\x12\x62\n\x13\x62igquery_publishing\x18\x01 \x01(\x0b\x32@.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishingB\x03\xe0\x41\x03\x12Z\n\x0fscan_statistics\x18\x02 \x01(\x0b\x32<.google.cloud.dataplex.v1.DataDiscoveryResult.ScanStatisticsB\x03\xe0\x41\x03\x1a\x65\n\x12\x42igQueryPublishing\x12\x38\n\x07\x64\x61taset\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x62igquery.googleapis.com/Dataset\x12\x15\n\x08location\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\xf8\x01\n\x0eScanStatistics\x12\x1a\n\x12scanned_file_count\x18\x01 \x01(\x05\x12\x1c\n\x14\x64\x61ta_processed_bytes\x18\x02 \x01(\x03\x12\x16\n\x0e\x66iles_excluded\x18\x03 \x01(\x05\x12\x16\n\x0etables_created\x18\x04 \x01(\x05\x12\x16\n\x0etables_deleted\x18\x05 \x01(\x05\x12\x16\n\x0etables_updated\x18\x06 \x01(\x05\x12\x18\n\x10\x66ilesets_created\x18\x07 \x01(\x05\x12\x18\n\x10\x66ilesets_deleted\x18\x08 \x01(\x05\x12\x18\n\x10\x66ilesets_updated\x18\t \x01(\x05\x42\xac\x02\n\x1c\x63om.google.cloud.dataplex.v1B\x12\x44\x61taDiscoveryProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xea\x41H\n\x1f\x62igquery.googleapis.com/Dataset\x12%projects/{project}/datasets/{dataset}\xea\x41p\n,bigqueryconnection.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + DataDiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec").msgclass + DataDiscoverySpec::BigQueryPublishingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig").msgclass + DataDiscoverySpec::BigQueryPublishingConfig::TableType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType").enummodule + DataDiscoverySpec::StorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig").msgclass + DataDiscoverySpec::StorageConfig::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions").msgclass + DataDiscoverySpec::StorageConfig::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions").msgclass + DataDiscoveryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoveryResult").msgclass + DataDiscoveryResult::BigQueryPublishing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing").msgclass + DataDiscoveryResult::ScanStatistics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoveryResult.ScanStatistics").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb new file mode 100644 index 000000000000..d845a62b4328 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_documentation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n1google/cloud/dataplex/v1/data_documentation.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x93\x02\n\x15\x44\x61taDocumentationSpec\x12\'\n\x1a\x63\x61talog_publishing_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12_\n\x11generation_scopes\x18\x03 \x03(\x0e\x32?.google.cloud.dataplex.v1.DataDocumentationSpec.GenerationScopeB\x03\xe0\x41\x01\"p\n\x0fGenerationScope\x12 \n\x1cGENERATION_SCOPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12!\n\x1dTABLE_AND_COLUMN_DESCRIPTIONS\x10\x02\x12\x0f\n\x0bSQL_QUERIES\x10\x03\"\xe9\x04\n\x17\x44\x61taDocumentationResult\x12Z\n\x0ctable_result\x18\x08 \x01(\x0b\x32=.google.cloud.dataplex.v1.DataDocumentationResult.TableResultB\x03\xe0\x41\x03H\x00\x1a\xd5\x01\n\x0bTableResult\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08overview\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12M\n\x06schema\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataDocumentationResult.SchemaB\x03\xe0\x41\x03\x12M\n\x07queries\x18\x04 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.QueryB\x03\xe0\x41\x03\x1a\x33\n\x05Query\x12\x10\n\x03sql\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1aV\n\x06Schema\x12L\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.FieldB\x03\xe0\x41\x03\x1a\x82\x01\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12L\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.FieldB\x03\xe0\x41\x03\x42\x08\n\x06resultBr\n\x1c\x63om.google.cloud.dataplex.v1B\x16\x44\x61taDocumentationProtoP\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 + DataDocumentationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationSpec").msgclass + DataDocumentationSpec::GenerationScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationSpec.GenerationScope").enummodule + DataDocumentationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult").msgclass + DataDocumentationResult::TableResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.TableResult").msgclass + DataDocumentationResult::Query = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.Query").msgclass + DataDocumentationResult::Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.Schema").msgclass + DataDocumentationResult::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.Field").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service.rb new file mode 100644 index 000000000000..6a721f1b6bca --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service.rb @@ -0,0 +1,57 @@ +# 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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +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/operations" +require "google/cloud/dataplex/v1/data_product_service/client" +require "google/cloud/dataplex/v1/data_product_service/rest" + +module Google + module Cloud + module Dataplex + module V1 + ## + # `DataProductService` provides APIs for managing data products and + # the underlying data assets. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/data_product_service" + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/data_product_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new + # + module DataProductService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_product_service", "helpers.rb" +require "google/cloud/dataplex/v1/data_product_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/client.rb new file mode 100644 index 000000000000..1430923e0d18 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/client.rb @@ -0,0 +1,1541 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/data_products_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataProductService + ## + # Client for the DataProductService service. + # + # `DataProductService` provides APIs for managing data products and + # the underlying data assets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_product_service_stub + + ## + # Configure the DataProductService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataProductService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataProductService clients + # ::Google::Cloud::Dataplex::V1::DataProductService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the 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::DataProductService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_product_service_stub.universe_domain + end + + ## + # Create a new DataProductService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataProductService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/data_products_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_product_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataProductService::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, + logger: @config.logger + ) + + @data_product_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_product_service_stub.endpoint + config.universe_domain = @data_product_service_stub.universe_domain + config.logger = @data_product_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_product_service_stub.endpoint + config.universe_domain = @data_product_service_stub.universe_domain + 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::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_product_service_stub.logger + end + + # Service calls + + ## + # Creates a data product. + # + # @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::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_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 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. Validates the request without actually creating the data product. + # Default: 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::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_data_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + 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 + metadata = @config.rpcs.create_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.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_product_service_stub.call_rpc :create_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 + + ## + # Deletes a data product. The deletion will fail if the data product is not + # empty (i.e. contains at least one data asset). + # + # @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::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 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 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. Validates the request without actually deleting the data product. + # Default: 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::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 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::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.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 \ + 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_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + + ## + # Gets a data product. + # + # @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::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 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 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::Cloud::Dataplex::V1::DataProduct] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataProduct] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::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 + # + 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::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.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 \ + 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_data_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists data products for a given project. + # + # @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::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 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 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 [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::ListDataProductsRequest.new + # + # # Call the list_data_products method. + # result = client.list_data_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, 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 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::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.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 \ + 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_data_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + + ## + # Updates a data product. + # + # @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::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 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 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 [::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::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 + 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. + # + # @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). + # + # @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::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.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 \ + 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_data_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + + ## + # Updates a data asset. + # + # @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::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 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 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. 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 [::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::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 update_data_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + 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.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 \ + 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_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.update_data_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + + ## + # 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. + # + # @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 + # + 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 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 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 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::Cloud::Dataplex::V1::DataAsset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAsset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::GetDataAssetRequest.new + # + # # Call the get_data_asset method. + # result = client.get_data_asset request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAsset. + # p result + # + def get_data_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + 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.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 \ + 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_data_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists data assets for a given data product. + # + # @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::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_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 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 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`. + # + # 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. + # + # 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::DataAsset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAsset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example 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::ListDataAssetsRequest.new + # + # # 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::DataAsset. + # p item + # end + # + 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::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_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 \ + 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_data_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataProductService API. + # + # 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::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 + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataProductService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_product.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::Cloud::Dataplex::V1::DataProductService::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 DataProductService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_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 :get_data_product + ## + # RPC-specific configuration for `list_data_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_products + ## + # RPC-specific configuration for `update_data_product` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_product + ## + # RPC-specific configuration for `create_data_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_asset + ## + # RPC-specific configuration for `update_data_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_asset + ## + # RPC-specific configuration for `delete_data_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_asset + ## + # RPC-specific configuration for `get_data_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_asset + ## + # RPC-specific configuration for `list_data_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_assets + + # @private + def initialize parent_rpcs = nil + 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 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb new file mode 100644 index 000000000000..b57ee714470f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataProductService + # Credentials for the DataProductService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/operations.rb new file mode 100644 index 000000000000..800f3d4f9f2e --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb new file mode 100644 index 000000000000..c708a5f9d497 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb @@ -0,0 +1,90 @@ +# 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 + module DataProductService + # Path helper methods for the DataProductService API. + module Paths + ## + # Create a fully-qualified DataAsset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataProducts/{data_product}/dataAssets/{data_asset}` + # + # @param project [String] + # @param location [String] + # @param data_product [String] + # @param data_asset [String] + # + # @return [::String] + 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, "data_product cannot contain /" if data_product.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataProducts/#{data_product}/dataAssets/#{data_asset}" + end + + ## + # Create a fully-qualified DataProduct resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataProducts/{data_product}` + # + # @param project [String] + # @param location [String] + # @param data_product [String] + # + # @return [::String] + 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}/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 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb new file mode 100644 index 000000000000..cf951758b07d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb @@ -0,0 +1,55 @@ +# 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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/data_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 + ## + # `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/data_product_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new + # + module DataProductService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/data_product_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb new file mode 100644 index 000000000000..2a28e3fdd5bb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb @@ -0,0 +1,1437 @@ +# 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 "google/cloud/errors" +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" + +module Google + module Cloud + module Dataplex + module V1 + module DataProductService + module Rest + ## + # REST client for the DataProductService service. + # + # `DataProductService` provides APIs for managing data products and + # the underlying data assets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_product_service_stub + + ## + # Configure the DataProductService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataProductService clients + # ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the 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::DataProductService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_product_service_stub.universe_domain + end + + ## + # Create a new DataProductService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataProductService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::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, + credentials: credentials, + logger: @config.logger + ) + + @data_product_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_product_service_stub.endpoint + config.universe_domain = @data_product_service_stub.universe_domain + config.bindings_override = @config.bindings_override + 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 = @data_product_service_stub.endpoint + config.universe_domain = @data_product_service_stub.universe_domain + config.bindings_override = @config.bindings_override + 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. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_product_service_stub.logger + end + + # Service calls + + ## + # Creates a data product. + # + # @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::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_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 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. Validates the request without actually creating the data product. + # Default: 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::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_data_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + 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_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.create_data_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + + ## + # Deletes a data product. The deletion will fail if the data product is not + # empty (i.e. contains at least one data asset). + # + # @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::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 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 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. Validates the request without actually deleting the data product. + # Default: 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::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 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::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.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 \ + lib_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_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + + ## + # Gets a data product. + # + # @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::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 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 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::Cloud::Dataplex::V1::DataProduct] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataProduct] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::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 + # + 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::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.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 \ + lib_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_data_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_product_service_stub.get_data_product 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 data products for a given project. + # + # @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::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 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 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 [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataProduct>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::ListDataProductsRequest.new + # + # # Call the list_data_products method. + # result = client.list_data_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, 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 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::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.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 \ + lib_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_data_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + + ## + # Updates a data product. + # + # @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::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 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 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 [::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::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. + # + # @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). + # + # @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::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.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 \ + lib_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_data_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + + ## + # Updates a data asset. + # + # @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::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 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 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. 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 [::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::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 update_data_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + 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.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 \ + lib_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_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + + ## + # 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. + # + # @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 [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 + # + 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 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 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::Cloud::Dataplex::V1::DataAsset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAsset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::GetDataAssetRequest.new + # + # # Call the get_data_asset method. + # result = client.get_data_asset request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAsset. + # p result + # + def get_data_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + 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.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 \ + lib_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_data_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_product_service_stub.get_data_asset 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 data assets for a given data product. + # + # @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::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_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 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 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`. + # + # 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. + # + # 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::DataAsset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAsset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example 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::ListDataAssetsRequest.new + # + # # 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::DataAsset. + # p item + # end + # + 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::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_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 \ + lib_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_data_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @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 + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataProductService REST API. + # + # 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::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 + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_product to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_product.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataProductService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_product.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + 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 DataProductService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_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 :get_data_product + ## + # RPC-specific configuration for `list_data_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_products + ## + # RPC-specific configuration for `update_data_product` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_product + ## + # RPC-specific configuration for `create_data_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_asset + ## + # RPC-specific configuration for `update_data_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_asset + ## + # RPC-specific configuration for `delete_data_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_asset + ## + # RPC-specific configuration for `get_data_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_asset + ## + # RPC-specific configuration for `list_data_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_assets + + # @private + def initialize parent_rpcs = nil + 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 + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb b/owl-bot-staging/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/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb new file mode 100644 index 000000000000..8e66390d0464 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb @@ -0,0 +1,695 @@ +# 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 "google/cloud/dataplex/v1/data_products_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataProductService + module Rest + ## + # REST service stub for the DataProductService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_data_product REST call + # + # @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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + 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_data_product_request request_pb + query_string_params = if query_string_params.any? + query_string_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_data_product", + 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_data_product REST call + # + # @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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + 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_delete_data_product_request request_pb + query_string_params = if query_string_params.any? + query_string_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_data_product", + 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_data_product REST call + # + # @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::Cloud::Dataplex::V1::DataProduct] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataProduct] + # A result object deserialized from the server's reply + 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_get_data_product_request request_pb + query_string_params = if query_string_params.any? + query_string_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_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataProduct.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_products REST call + # + # @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::ListDataProductsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataProductsResponse] + # A result object deserialized from the server's reply + 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_list_data_products_request request_pb + query_string_params = if query_string_params.any? + query_string_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_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataProductsResponse.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_data_product REST call + # + # @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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + 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_update_data_product_request request_pb + query_string_params = if query_string_params.any? + query_string_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_data_product", + 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 create_data_asset REST call + # + # @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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + 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_create_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: "create_data_asset", + 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_data_asset REST call + # + # @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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + 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_update_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: "update_data_asset", + 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_data_asset REST call + # + # @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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + 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_delete_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: "delete_data_asset", + 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_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 + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_product REST call + # + # @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_data_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataProducts", + body: "data_product", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_product REST call + # + # @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_delete_data_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_product REST call + # + # @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_get_data_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_products REST call + # + # @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_list_data_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataProducts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_product REST call + # + # @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_update_data_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_product.name}", + body: "data_product", + matches: [ + ["data_product.name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_asset REST call + # + # @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_create_data_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAssets", + body: "data_asset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_asset REST call + # + # @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_update_data_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_asset.name}", + body: "data_asset", + matches: [ + ["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: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/dataAssets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_asset REST call + # + # @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_get_data_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["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}/dataAssets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_pb.rb new file mode 100644 index 000000000000..457b915184bb --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_services_pb.rb new file mode 100644 index 000000000000..9b09649bc9fe --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb new file mode 100644 index 000000000000..d1d5aea2dcd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_profile.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/dataplex/v1/datascans_common_pb' +require 'google/cloud/dataplex/v1/processing_pb' + + +descriptor_data = "\n+google/cloud/dataplex/v1/data_profile.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a/google/cloud/dataplex/v1/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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + DataProfileSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec").msgclass + DataProfileSpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions").msgclass + DataProfileSpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport").msgclass + DataProfileSpec::SelectedFields = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.SelectedFields").msgclass + DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult").msgclass + DataProfileResult::Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile").msgclass + DataProfileResult::Profile::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field").msgclass + DataProfileResult::Profile::Field::ProfileInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo").msgclass + DataProfileResult::Profile::Field::ProfileInfo::TopNValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue").msgclass + DataProfileResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult").msgclass + DataProfileResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult").msgclass + DataProfileResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb new file mode 100644 index 000000000000..f7bf38c1768a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_quality.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/datascans_common_pb' +require 'google/cloud/dataplex/v1/processing_pb' + + +descriptor_data = "\n+google/cloud/dataplex/v1/data_quality.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/dataplex/v1/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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + DataQualitySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec").msgclass + DataQualitySpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions").msgclass + DataQualitySpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport").msgclass + DataQualitySpec::PostScanActions::Recipients = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients").msgclass + DataQualitySpec::PostScanActions::ScoreThresholdTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger").msgclass + DataQualitySpec::PostScanActions::JobFailureTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger").msgclass + DataQualitySpec::PostScanActions::JobEndTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger").msgclass + DataQualitySpec::PostScanActions::NotificationReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport").msgclass + DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult").msgclass + DataQualityResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult").msgclass + DataQualityResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult").msgclass + DataQualityResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State").enummodule + 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 + DataQualityRule::RangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RangeExpectation").msgclass + DataQualityRule::NonNullExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation").msgclass + DataQualityRule::SetExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SetExpectation").msgclass + DataQualityRule::RegexExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RegexExpectation").msgclass + DataQualityRule::UniquenessExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation").msgclass + DataQualityRule::StatisticRangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation").msgclass + DataQualityRule::StatisticRangeExpectation::ColumnStatistic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic").enummodule + DataQualityRule::RowConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation").msgclass + DataQualityRule::TableConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation").msgclass + DataQualityRule::SqlAssertion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SqlAssertion").msgclass + 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 + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb new file mode 100644 index 000000000000..af7b1b394a0b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/data_scan_service/credentials" +require "google/cloud/dataplex/v1/data_scan_service/paths" +require "google/cloud/dataplex/v1/data_scan_service/operations" +require "google/cloud/dataplex/v1/data_scan_service/client" +require "google/cloud/dataplex/v1/data_scan_service/rest" + +module Google + module Cloud + module Dataplex + module V1 + ## + # DataScanService manages DataScan resources which can be configured to run + # various types of data scanning workload and generate enriched metadata (e.g. + # Data Profile, Data Quality) for the data source. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/data_scan_service" + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/data_scan_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + module DataScanService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_scan_service", "helpers.rb" +require "google/cloud/dataplex/v1/data_scan_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb new file mode 100644 index 000000000000..6e5073a0070d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb @@ -0,0 +1,1398 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + ## + # Client for the DataScanService service. + # + # DataScanService manages DataScan resources which can be configured to run + # various types of data scanning workload and generate enriched metadata (e.g. + # Data Profile, Data Quality) for the data source. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_scan_service_stub + + ## + # Configure the DataScanService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataScanService clients + # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_scan_service_stub.universe_domain + end + + ## + # Create a new DataScanService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataScanService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/datascans_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_scan_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataScanService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @data_scan_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + config.logger = @data_scan_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + config.logger = @data_scan_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataScanService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_scan_service_stub.logger + end + + # Service calls + + ## + # Creates a DataScan resource. + # + # @overload create_data_scan(request, options = nil) + # Pass arguments to `create_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) + # Pass arguments to `create_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent location: + # `projects/{project}/locations/{location_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource. + # @param data_scan_id [::String] + # Required. DataScan identifier. + # + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique within the customer project / location. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new + # + # # Call the create_data_scan method. + # result = client.create_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_scan.metadata.to_h + + # Set x-goog-api-client, 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_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :create_data_scan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataScan resource. + # + # @overload update_data_scan(request, options = nil) + # Pass arguments to `update_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource to be updated. + # + # Only fields specified in `update_mask` are updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new + # + # # Call the update_data_scan method. + # result = client.update_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_scan.metadata.to_h + + # Set x-goog-api-client, 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_scan&.name + header_params["data_scan.name"] = request.data_scan.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :update_data_scan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataScan resource. + # + # @overload delete_data_scan(request, options = nil) + # Pass arguments to `delete_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_scan(name: nil, force: nil) + # Pass arguments to `delete_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataScan: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param force [::Boolean] + # Optional. If set to true, any child resources of this data scan will also + # be deleted. (Otherwise, the request will only work if the data scan has no + # child resources.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new + # + # # Call the delete_data_scan method. + # result = client.delete_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_scan.metadata.to_h + + # Set x-goog-api-client, 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_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :delete_data_scan, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScan resource. + # + # @overload get_data_scan(request, options = nil) + # Pass arguments to `get_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_scan(name: nil, view: nil) + # Pass arguments to `get_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataScan: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] + # Optional. Select the DataScan view to return. Defaults to `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScan] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new + # + # # Call the get_data_scan method. + # result = client.get_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. + # p result + # + def get_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_scan.metadata.to_h + + # Set x-goog-api-client, 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_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :get_data_scan, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScans. + # + # @overload list_data_scans(request, options = nil) + # Pass arguments to `list_data_scans` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_scans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent location: + # `projects/{project}/locations/{location_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of dataScans to return. The service may return + # fewer than this value. If unspecified, at most 500 scans will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListDataScans` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListDataScans` must match the call that provided the + # page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new + # + # # Call the list_data_scans method. + # result = client.list_data_scans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. + # p item + # end + # + def list_data_scans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_scans.metadata.to_h + + # Set x-goog-api-client, 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_data_scans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_scans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :list_data_scans, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs an on-demand execution of a DataScan + # + # @overload run_data_scan(request, options = nil) + # Pass arguments to `run_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_data_scan(name: nil) + # Pass arguments to `run_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataScan: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # + # Only **OnDemand** data scans are allowed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new + # + # # Call the run_data_scan method. + # result = client.run_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. + # p result + # + def run_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_data_scan.metadata.to_h + + # Set x-goog-api-client, 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.run_data_scan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :run_data_scan, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScanJob resource. + # + # @overload get_data_scan_job(request, options = nil) + # Pass arguments to `get_data_scan_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_scan_job(name: nil, view: nil) + # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataScanJob: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] + # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScanJob] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new + # + # # Call the get_data_scan_job method. + # result = client.get_data_scan_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. + # p result + # + def get_data_scan_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_scan_job.metadata.to_h + + # Set x-goog-api-client, 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_data_scan_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_scan_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :get_data_scan_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScanJobs under the given DataScan. + # + # @overload list_data_scan_jobs(request, options = nil) + # Pass arguments to `list_data_scan_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of DataScanJobs to return. The service may return + # fewer than this value. If unspecified, at most 10 DataScanJobs will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListDataScanJobs` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListDataScanJobs` must match the call that provided + # the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the ListDataScanJobs + # request. + # + # If unspecified, all datascan jobs will be returned. Multiple filters can be + # applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + # + # Allowed fields are: + # + # - `start_time` + # - `end_time` + # + # `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + # 2018-10-08T18:30:00-07:00). + # + # For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + # 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + # specified start and end times. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new + # + # # Call the list_data_scan_jobs method. + # result = client.list_data_scan_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. + # p item + # end + # + def list_data_scan_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h + + # Set x-goog-api-client, 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_data_scan_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :list_data_scan_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates recommended data quality rules based on the results of a data + # profiling scan. + # + # Use the recommendations to build rules for a data quality scan. + # + # @overload generate_data_quality_rules(request, options = nil) + # Pass arguments to `generate_data_quality_rules` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_data_quality_rules(name: nil) + # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name must be one of the following: + # + # * The name of a data scan with at least one successful, completed data + # profiling job + # * The name of a successful, completed data profiling job (a data scan job + # where the job type is data profiling) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new + # + # # Call the generate_data_quality_rules method. + # result = client.generate_data_quality_rules request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. + # p result + # + def generate_data_quality_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h + + # Set x-goog-api-client, 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.generate_data_quality_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.call_rpc :generate_data_quality_rules, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataScanService API. + # + # This class represents the configuration for DataScanService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_scan to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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::Cloud::Dataplex::V1::DataScanService::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 DataScanService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_scan + ## + # RPC-specific configuration for `update_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_scan + ## + # RPC-specific configuration for `delete_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_scan + ## + # RPC-specific configuration for `get_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan + ## + # RPC-specific configuration for `list_data_scans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scans + ## + # RPC-specific configuration for `run_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :run_data_scan + ## + # RPC-specific configuration for `get_data_scan_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan_job + ## + # RPC-specific configuration for `list_data_scan_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scan_jobs + ## + # RPC-specific configuration for `generate_data_quality_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_data_quality_rules + + # @private + def initialize parent_rpcs = nil + create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan + @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config + update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan + @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config + delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan + @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config + get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan + @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config + list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans + @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config + run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan + @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config + get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job + @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config + list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs + @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config + generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules + @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb new file mode 100644 index 000000000000..42a335dd36b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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 "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # Credentials for the DataScanService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb new file mode 100644 index 000000000000..88220c65ab6b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_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 DataScanService + # 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 DataScanService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb new file mode 100644 index 000000000000..18231b24daf4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb @@ -0,0 +1,163 @@ +# 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 + module DataScanService + # Path helper methods for the DataScanService API. + module Paths + ## + # Create a fully-qualified Connection resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # + # @return [::String] + def connection_path project:, location:, connection: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}" + end + + ## + # Create a fully-qualified DataScan resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataScans/{data_scan}` + # + # @param project [String] + # @param location [String] + # @param data_scan [String] + # + # @return [::String] + def data_scan_path project:, location:, data_scan: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataScans/#{data_scan}" + end + + ## + # Create a fully-qualified DataScanJob resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataScans/{data_scan}/jobs/{job}` + # + # @param project [String] + # @param location [String] + # @param data_scan [String] + # @param job [String] + # + # @return [::String] + def data_scan_job_path project:, location:, data_scan:, job: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_scan cannot contain /" if data_scan.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataScans/#{data_scan}/jobs/#{job}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}` + # + # @param project [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}" + end + + ## + # Create a fully-qualified Entity resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param entity [String] + # + # @return [::String] + def entity_path project:, location:, lake:, zone:, entity: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb new file mode 100644 index 000000000000..94ca6428c4c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/data_scan_service/credentials" +require "google/cloud/dataplex/v1/data_scan_service/paths" +require "google/cloud/dataplex/v1/data_scan_service/rest/operations" +require "google/cloud/dataplex/v1/data_scan_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # DataScanService manages DataScan resources which can be configured to run + # various types of data scanning workload and generate enriched metadata (e.g. + # Data Profile, Data Quality) for the data source. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/data_scan_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + module DataScanService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/data_scan_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb new file mode 100644 index 000000000000..ca085ec3e870 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb @@ -0,0 +1,1301 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/datascans_pb" +require "google/cloud/dataplex/v1/data_scan_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + module Rest + ## + # REST client for the DataScanService service. + # + # DataScanService manages DataScan resources which can be configured to run + # various types of data scanning workload and generate enriched metadata (e.g. + # Data Profile, Data Quality) for the data source. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_scan_service_stub + + ## + # Configure the DataScanService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataScanService clients + # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_scan_service_stub.universe_domain + end + + ## + # Create a new DataScanService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataScanService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_scan_service_stub = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_scan_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @data_scan_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 = @data_scan_service_stub.endpoint + config.universe_domain = @data_scan_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @data_scan_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_scan_service_stub.logger + end + + # Service calls + + ## + # Creates a DataScan resource. + # + # @overload create_data_scan(request, options = nil) + # Pass arguments to `create_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) + # Pass arguments to `create_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent location: + # `projects/{project}/locations/{location_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource. + # @param data_scan_id [::String] + # Required. DataScan identifier. + # + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique within the customer project / location. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new + # + # # Call the create_data_scan method. + # result = client.create_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_scan.metadata.to_h + + # Set x-goog-api-client, 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_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.create_data_scan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataScan resource. + # + # @overload update_data_scan(request, options = nil) + # Pass arguments to `update_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] + # Required. DataScan resource to be updated. + # + # Only fields specified in `update_mask` are updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new + # + # # Call the update_data_scan method. + # result = client.update_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_scan.metadata.to_h + + # Set x-goog-api-client, 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_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.update_data_scan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataScan resource. + # + # @overload delete_data_scan(request, options = nil) + # Pass arguments to `delete_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_scan(name: nil, force: nil) + # Pass arguments to `delete_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataScan: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param force [::Boolean] + # Optional. If set to true, any child resources of this data scan will also + # be deleted. (Otherwise, the request will only work if the data scan has no + # child resources.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new + # + # # Call the delete_data_scan method. + # result = client.delete_data_scan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_scan.metadata.to_h + + # Set x-goog-api-client, 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_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.delete_data_scan request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScan resource. + # + # @overload get_data_scan(request, options = nil) + # Pass arguments to `get_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_scan(name: nil, view: nil) + # Pass arguments to `get_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataScan: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] + # Optional. Select the DataScan view to return. Defaults to `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new + # + # # Call the get_data_scan method. + # result = client.get_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. + # p result + # + def get_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_scan.metadata.to_h + + # Set x-goog-api-client, 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_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.get_data_scan request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScans. + # + # @overload list_data_scans(request, options = nil) + # Pass arguments to `list_data_scans` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_scans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent location: + # `projects/{project}/locations/{location_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of dataScans to return. The service may return + # fewer than this value. If unspecified, at most 500 scans will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListDataScans` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListDataScans` must match the call that provided the + # page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new + # + # # Call the list_data_scans method. + # result = client.list_data_scans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. + # p item + # end + # + def list_data_scans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_scans.metadata.to_h + + # Set x-goog-api-client, 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_data_scans.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_scans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.list_data_scans request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, "data_scans", 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 + + ## + # Runs an on-demand execution of a DataScan + # + # @overload run_data_scan(request, options = nil) + # Pass arguments to `run_data_scan` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_data_scan(name: nil) + # Pass arguments to `run_data_scan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataScan: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # + # Only **OnDemand** data scans are allowed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new + # + # # Call the run_data_scan method. + # result = client.run_data_scan request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. + # p result + # + def run_data_scan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_data_scan.metadata.to_h + + # Set x-goog-api-client, 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.run_data_scan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_data_scan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.run_data_scan request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a DataScanJob resource. + # + # @overload get_data_scan_job(request, options = nil) + # Pass arguments to `get_data_scan_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_scan_job(name: nil, view: nil) + # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataScanJob: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] + # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new + # + # # Call the get_data_scan_job method. + # result = client.get_data_scan_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. + # p result + # + def get_data_scan_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_scan_job.metadata.to_h + + # Set x-goog-api-client, 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_data_scan_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_scan_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.get_data_scan_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataScanJobs under the given DataScan. + # + # @overload list_data_scan_jobs(request, options = nil) + # Pass arguments to `list_data_scan_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of DataScanJobs to return. The service may return + # fewer than this value. If unspecified, at most 10 DataScanJobs will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListDataScanJobs` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListDataScanJobs` must match the call that provided + # the page token. + # @param filter [::String] + # Optional. An expression for filtering the results of the ListDataScanJobs + # request. + # + # If unspecified, all datascan jobs will be returned. Multiple filters can be + # applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + # + # Allowed fields are: + # + # - `start_time` + # - `end_time` + # + # `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + # 2018-10-08T18:30:00-07:00). + # + # For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + # 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + # specified start and end times. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new + # + # # Call the list_data_scan_jobs method. + # result = client.list_data_scan_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. + # p item + # end + # + def list_data_scan_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h + + # Set x-goog-api-client, 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_data_scan_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.list_data_scan_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, "data_scan_jobs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates recommended data quality rules based on the results of a data + # profiling scan. + # + # Use the recommendations to build rules for a data quality scan. + # + # @overload generate_data_quality_rules(request, options = nil) + # Pass arguments to `generate_data_quality_rules` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload generate_data_quality_rules(name: nil) + # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name must be one of the following: + # + # * The name of a data scan with at least one successful, completed data + # profiling job + # * The name of a successful, completed data profiling job (a data scan job + # where the job type is data profiling) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new + # + # # Call the generate_data_quality_rules method. + # result = client.generate_data_quality_rules request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. + # p result + # + def generate_data_quality_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h + + # Set x-goog-api-client, 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.generate_data_quality_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_scan_service_stub.generate_data_quality_rules request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataScanService REST API. + # + # This class represents the configuration for DataScanService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_scan to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_scan.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # 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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + 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 DataScanService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_scan + ## + # RPC-specific configuration for `update_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_scan + ## + # RPC-specific configuration for `delete_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_scan + ## + # RPC-specific configuration for `get_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan + ## + # RPC-specific configuration for `list_data_scans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scans + ## + # RPC-specific configuration for `run_data_scan` + # @return [::Gapic::Config::Method] + # + attr_reader :run_data_scan + ## + # RPC-specific configuration for `get_data_scan_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_scan_job + ## + # RPC-specific configuration for `list_data_scan_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_scan_jobs + ## + # RPC-specific configuration for `generate_data_quality_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_data_quality_rules + + # @private + def initialize parent_rpcs = nil + create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan + @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config + update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan + @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config + delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan + @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config + get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan + @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config + list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans + @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config + run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan + @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config + get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job + @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config + list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs + @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config + generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules + @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb new file mode 100644 index 000000000000..a47c9519b156 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_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 DataScanService + 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 DataScanService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataScanService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb new file mode 100644 index 000000000000..e5d885940f89 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb @@ -0,0 +1,642 @@ +# 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 "google/cloud/dataplex/v1/datascans_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + module Rest + ## + # REST service stub for the DataScanService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_data_scan", + 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_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_scan", + 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_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_data_scan", + 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_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # A result object deserialized from the server's reply + def get_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_scan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataScan.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_scans REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] + # A result object deserialized from the server's reply + def list_data_scans request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scans_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_scans", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the run_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] + # A result object deserialized from the server's reply + def run_data_scan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_data_scan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_data_scan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.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_scan_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # A result object deserialized from the server's reply + def get_data_scan_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_scan_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataScanJob.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_scan_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] + # A result object deserialized from the server's reply + def list_data_scan_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scan_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_scan_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the generate_data_quality_rules REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] + # A result object deserialized from the server's reply + def generate_data_quality_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_data_quality_rules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "generate_data_quality_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.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 create_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataScans", + body: "data_scan", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_scan.name}", + body: "data_scan", + matches: [ + ["data_scan.name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_scans REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_scans_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataScans", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_data_scan REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_data_scan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_scan_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_scan_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_scan_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_scan_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_data_quality_rules REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_data_quality_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:generateDataQualityRules", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:generateDataQualityRules", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb new file mode 100644 index 000000000000..b3ef13103a56 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/data_taxonomy.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/security_pb' +require 'google/cloud/dataplex/v1/service_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/dataplex/v1/data_taxonomy.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/dataplex/v1/security.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + DataTaxonomy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataTaxonomy").msgclass + DataAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttribute").msgclass + DataAttributeBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding").msgclass + DataAttributeBinding::Path = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding.Path").msgclass + CreateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataTaxonomyRequest").msgclass + UpdateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataTaxonomyRequest").msgclass + GetDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataTaxonomyRequest").msgclass + ListDataTaxonomiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesRequest").msgclass + ListDataTaxonomiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesResponse").msgclass + DeleteDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataTaxonomyRequest").msgclass + CreateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeRequest").msgclass + UpdateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeRequest").msgclass + GetDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeRequest").msgclass + ListDataAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesRequest").msgclass + ListDataAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesResponse").msgclass + DeleteDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeRequest").msgclass + CreateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeBindingRequest").msgclass + UpdateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest").msgclass + GetDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeBindingRequest").msgclass + ListDataAttributeBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsRequest").msgclass + ListDataAttributeBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsResponse").msgclass + DeleteDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb new file mode 100644 index 000000000000..3a498e42dff4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb @@ -0,0 +1,59 @@ +# 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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" +require "google/cloud/dataplex/v1/data_taxonomy_service/paths" +require "google/cloud/dataplex/v1/data_taxonomy_service/operations" +require "google/cloud/dataplex/v1/data_taxonomy_service/client" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + +module Google + module Cloud + module Dataplex + module V1 + ## + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + # @deprecated This service is deprecated and may be removed in the next major version update. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/data_taxonomy_service" + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + module DataTaxonomyService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_taxonomy_service", "helpers.rb" +require "google/cloud/dataplex/v1/data_taxonomy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb new file mode 100644 index 000000000000..5443aceee087 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb @@ -0,0 +1,2060 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + ## + # Client for the DataTaxonomyService service. + # + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_taxonomy_service_stub + + ## + # Configure the DataTaxonomyService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} + # for a description of the configuration fields. + # + # @deprecated This service is deprecated and may be removed in the next major version update. + # + # @example + # + # # Modify the configuration for all DataTaxonomyService clients + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_taxonomy_service_stub.universe_domain + end + + ## + # Create a new DataTaxonomyService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTaxonomyService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/data_taxonomy_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_taxonomy_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @data_taxonomy_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_taxonomy_service_stub.logger + end + + # Service calls + + ## + # Create a DataTaxonomy resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload create_data_taxonomy(request, options = nil) + # Pass arguments to `create_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # @param data_taxonomy_id [::String] + # Required. DataTaxonomy identifier. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must be between 1-63 characters. + # * Must end with a number or a letter. + # * Must be unique within the Project. + # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. DataTaxonomy resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new + # + # # Call the create_data_taxonomy method. + # result = client.create_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_taxonomy.metadata.to_h + + # Set x-goog-api-client, 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_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :create_data_taxonomy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataTaxonomy resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload update_data_taxonomy(request, options = nil) + # Pass arguments to `update_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new + # + # # Call the update_data_taxonomy method. + # result = client.update_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_taxonomy.metadata.to_h + + # Set x-goog-api-client, 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_taxonomy&.name + header_params["data_taxonomy.name"] = request.data_taxonomy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :update_data_taxonomy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + # must be deleted before the DataTaxonomy can be deleted. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload delete_data_taxonomy(request, options = nil) + # Pass arguments to `delete_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_taxonomy(name: nil, etag: nil) + # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value,the DeleteDataTaxonomy method returns an ABORTED error. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new + # + # # Call the delete_data_taxonomy method. + # result = client.delete_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h + + # Set x-goog-api-client, 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_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :delete_data_taxonomy, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataTaxonomy resources in a project and location. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload list_data_taxonomies(request, options = nil) + # Pass arguments to `list_data_taxonomies` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the DataTaxonomy location, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of DataTaxonomies to return. The service may + # return fewer than this value. If unspecified, at most 10 DataTaxonomies + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous ` ListDataTaxonomies` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to ` ListDataTaxonomies` must match the call that + # provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new + # + # # Call the list_data_taxonomies method. + # result = client.list_data_taxonomies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. + # p item + # end + # + def list_data_taxonomies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_taxonomies.metadata.to_h + + # Set x-goog-api-client, 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_data_taxonomies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_taxonomies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :list_data_taxonomies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataTaxonomy resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload get_data_taxonomy(request, options = nil) + # Pass arguments to `get_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_taxonomy(name: nil) + # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new + # + # # Call the get_data_taxonomy method. + # result = client.get_data_taxonomy request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. + # p result + # + def get_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_taxonomy.metadata.to_h + + # Set x-goog-api-client, 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_data_taxonomy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :get_data_taxonomy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttributeBinding resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload create_data_attribute_binding(request, options = nil) + # Pass arguments to `create_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id} + # @param data_attribute_binding_id [::String] + # Required. DataAttributeBinding identifier. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must be between 1-63 characters. + # * Must end with a number or a letter. + # * Must be unique within the Location. + # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. DataAttributeBinding resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new + # + # # Call the create_data_attribute_binding method. + # result = client.create_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :create_data_attribute_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttributeBinding resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload update_data_attribute_binding(request, options = nil) + # Pass arguments to `update_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new + # + # # Call the update_data_attribute_binding method. + # result = client.update_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client, 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_attribute_binding&.name + header_params["data_attribute_binding.name"] = request.data_attribute_binding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :update_data_attribute_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataAttributeBinding resource. All attributes within the + # DataAttributeBinding must be deleted before the DataAttributeBinding can be + # deleted. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload delete_data_attribute_binding(request, options = nil) + # Pass arguments to `delete_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_attribute_binding(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @param etag [::String] + # Required. If the client provided etag value does not match the current etag + # value, the DeleteDataAttributeBindingRequest method returns an ABORTED + # error response. Etags must be used when calling the + # DeleteDataAttributeBinding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new + # + # # Call the delete_data_attribute_binding method. + # result = client.delete_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client, 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_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :delete_data_attribute_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataAttributeBinding resources in a project and location. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload list_data_attribute_bindings(request, options = nil) + # Pass arguments to `list_data_attribute_bindings` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the Location: + # projects/\\{project_number}/locations/\\{location_id} + # @param page_size [::Integer] + # Optional. Maximum number of DataAttributeBindings to return. The service + # may return fewer than this value. If unspecified, at most 10 + # DataAttributeBindings will be returned. The maximum value is 1000; values + # above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListDataAttributeBindings` + # call. Provide this to retrieve the subsequent page. When paginating, all + # other parameters provided to `ListDataAttributeBindings` must match the + # call that provided the page token. + # @param filter [::String] + # Optional. Filter request. + # Filter using resource: filter=resource:"resource-name" + # Filter using attribute: filter=attributes:"attribute-name" + # Filter using attribute in paths list: + # filter=paths.attributes:"attribute-name" + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new + # + # # Call the list_data_attribute_bindings method. + # result = client.list_data_attribute_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p item + # end + # + def list_data_attribute_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :list_data_attribute_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a DataAttributeBinding resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload get_data_attribute_binding(request, options = nil) + # Pass arguments to `get_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_attribute_binding(name: nil) + # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new + # + # # Call the get_data_attribute_binding method. + # result = client.get_data_attribute_binding request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p result + # + def get_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :get_data_attribute_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttribute resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload create_data_attribute(request, options = nil) + # Pass arguments to `create_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `create_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param data_attribute_id [::String] + # Required. DataAttribute identifier. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must be between 1-63 characters. + # * Must end with a number or a letter. + # * Must be unique within the DataTaxonomy. + # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. DataAttribute resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new + # + # # Call the create_data_attribute method. + # result = client.create_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_attribute.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :create_data_attribute, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttribute resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload update_data_attribute(request, options = nil) + # Pass arguments to `update_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `update_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new + # + # # Call the update_data_attribute method. + # result = client.update_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_attribute.metadata.to_h + + # Set x-goog-api-client, 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_attribute&.name + header_params["data_attribute.name"] = request.data_attribute.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :update_data_attribute, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Data Attribute resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload delete_data_attribute(request, options = nil) + # Pass arguments to `delete_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_data_attribute(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteDataAttribute method returns an ABORTED error response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new + # + # # Call the delete_data_attribute method. + # result = client.delete_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_data_attribute.metadata.to_h + + # Set x-goog-api-client, 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_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :delete_data_attribute, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Data Attribute resources in a DataTaxonomy. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload list_data_attributes(request, options = nil) + # Pass arguments to `list_data_attributes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param page_size [::Integer] + # Optional. Maximum number of DataAttributes to return. The service may + # return fewer than this value. If unspecified, at most 10 dataAttributes + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListDataAttributes` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListDataAttributes` must match the call that + # provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new + # + # # Call the list_data_attributes method. + # result = client.list_data_attributes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. + # p item + # end + # + def list_data_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_data_attributes.metadata.to_h + + # Set x-goog-api-client, 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_data_attributes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :list_data_attributes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a Data Attribute resource. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload get_data_attribute(request, options = nil) + # Pass arguments to `get_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_data_attribute(name: nil) + # Pass arguments to `get_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttribute] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new + # + # # Call the get_data_attribute method. + # result = client.get_data_attribute request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. + # p result + # + def get_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_data_attribute.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.call_rpc :get_data_attribute, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataTaxonomyService API. + # + # This class represents the configuration for DataTaxonomyService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_taxonomy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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::Cloud::Dataplex::V1::DataTaxonomyService::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 DataTaxonomyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_taxonomy + ## + # RPC-specific configuration for `update_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_taxonomy + ## + # RPC-specific configuration for `delete_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_taxonomy + ## + # RPC-specific configuration for `list_data_taxonomies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_taxonomies + ## + # RPC-specific configuration for `get_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_taxonomy + ## + # RPC-specific configuration for `create_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute_binding + ## + # RPC-specific configuration for `update_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute_binding + ## + # RPC-specific configuration for `delete_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute_binding + ## + # RPC-specific configuration for `list_data_attribute_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attribute_bindings + ## + # RPC-specific configuration for `get_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute_binding + ## + # RPC-specific configuration for `create_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute + ## + # RPC-specific configuration for `update_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute + ## + # RPC-specific configuration for `delete_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute + ## + # RPC-specific configuration for `list_data_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attributes + ## + # RPC-specific configuration for `get_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute + + # @private + def initialize parent_rpcs = nil + create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy + @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config + update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy + @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config + delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy + @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config + list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies + @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config + get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy + @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config + create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding + @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config + update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding + @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config + delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding + @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config + list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings + @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config + get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding + @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config + create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute + @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config + update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute + @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config + delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute + @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config + list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes + @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config + get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute + @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb new file mode 100644 index 000000000000..0658f853f858 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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 "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # Credentials for the DataTaxonomyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb new file mode 100644 index 000000000000..c26ba3d485bf --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_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 DataTaxonomyService + # 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 DataTaxonomyService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb new file mode 100644 index 000000000000..2e020a367723 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +# Copyright 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 + module DataTaxonomyService + # Path helper methods for the DataTaxonomyService API. + module Paths + ## + # Create a fully-qualified DataAttribute resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy}/attributes/{data_attribute_id}` + # + # @param project [String] + # @param location [String] + # @param data_taxonomy [String] + # @param data_attribute_id [String] + # + # @return [::String] + def data_attribute_path project:, location:, data_taxonomy:, data_attribute_id: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_taxonomy cannot contain /" if data_taxonomy.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataTaxonomies/#{data_taxonomy}/attributes/#{data_attribute_id}" + end + + ## + # Create a fully-qualified DataAttributeBinding resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}` + # + # @param project [String] + # @param location [String] + # @param data_attribute_binding_id [String] + # + # @return [::String] + def data_attribute_binding_path project:, location:, data_attribute_binding_id: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataAttributeBindings/#{data_attribute_binding_id}" + end + + ## + # Create a fully-qualified DataTaxonomy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}` + # + # @param project [String] + # @param location [String] + # @param data_taxonomy_id [String] + # + # @return [::String] + def data_taxonomy_path project:, location:, data_taxonomy_id: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataTaxonomies/#{data_taxonomy_id}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb new file mode 100644 index 000000000000..d1b1b0fb22b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" +require "google/cloud/dataplex/v1/data_taxonomy_service/paths" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/operations" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + module DataTaxonomyService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb new file mode 100644 index 000000000000..fbf0dcd9f1ad --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb @@ -0,0 +1,1890 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/data_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + module Rest + ## + # REST client for the DataTaxonomyService service. + # + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_taxonomy_service_stub + + ## + # Configure the DataTaxonomyService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # @deprecated This service is deprecated and may be removed in the next major version update. + # + # @example + # + # # Modify the configuration for all DataTaxonomyService clients + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_taxonomy_service_stub.universe_domain + end + + ## + # Create a new DataTaxonomyService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTaxonomyService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_taxonomy_service_stub = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_taxonomy_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @data_taxonomy_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 = @data_taxonomy_service_stub.endpoint + config.universe_domain = @data_taxonomy_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_taxonomy_service_stub.logger + end + + # Service calls + + ## + # Create a DataTaxonomy resource. + # + # @overload create_data_taxonomy(request, options = nil) + # Pass arguments to `create_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # @param data_taxonomy_id [::String] + # Required. DataTaxonomy identifier. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must be between 1-63 characters. + # * Must end with a number or a letter. + # * Must be unique within the Project. + # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. DataTaxonomy resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new + # + # # Call the create_data_taxonomy method. + # result = client.create_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_taxonomy.metadata.to_h + + # Set x-goog-api-client, 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_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.create_data_taxonomy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataTaxonomy resource. + # + # @overload update_data_taxonomy(request, options = nil) + # Pass arguments to `update_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) + # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new + # + # # Call the update_data_taxonomy method. + # result = client.update_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_taxonomy.metadata.to_h + + # Set x-goog-api-client, 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_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.update_data_taxonomy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + # must be deleted before the DataTaxonomy can be deleted. + # + # @overload delete_data_taxonomy(request, options = nil) + # Pass arguments to `delete_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_taxonomy(name: nil, etag: nil) + # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value,the DeleteDataTaxonomy method returns an ABORTED error. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new + # + # # Call the delete_data_taxonomy method. + # result = client.delete_data_taxonomy request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h + + # Set x-goog-api-client, 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_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.delete_data_taxonomy request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataTaxonomy resources in a project and location. + # + # @overload list_data_taxonomies(request, options = nil) + # Pass arguments to `list_data_taxonomies` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the DataTaxonomy location, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of DataTaxonomies to return. The service may + # return fewer than this value. If unspecified, at most 10 DataTaxonomies + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous ` ListDataTaxonomies` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to ` ListDataTaxonomies` must match the call that + # provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new + # + # # Call the list_data_taxonomies method. + # result = client.list_data_taxonomies request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. + # p item + # end + # + def list_data_taxonomies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_taxonomies.metadata.to_h + + # Set x-goog-api-client, 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_data_taxonomies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_taxonomies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.list_data_taxonomies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, "data_taxonomies", 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 + + ## + # Retrieves a DataTaxonomy resource. + # + # @overload get_data_taxonomy(request, options = nil) + # Pass arguments to `get_data_taxonomy` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_taxonomy(name: nil) + # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new + # + # # Call the get_data_taxonomy method. + # result = client.get_data_taxonomy request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. + # p result + # + def get_data_taxonomy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_taxonomy.metadata.to_h + + # Set x-goog-api-client, 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_data_taxonomy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_taxonomy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.get_data_taxonomy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttributeBinding resource. + # + # @overload create_data_attribute_binding(request, options = nil) + # Pass arguments to `create_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id} + # @param data_attribute_binding_id [::String] + # Required. DataAttributeBinding identifier. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must be between 1-63 characters. + # * Must end with a number or a letter. + # * Must be unique within the Location. + # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. DataAttributeBinding resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new + # + # # Call the create_data_attribute_binding method. + # result = client.create_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.create_data_attribute_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttributeBinding resource. + # + # @overload update_data_attribute_binding(request, options = nil) + # Pass arguments to `update_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) + # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new + # + # # Call the update_data_attribute_binding method. + # result = client.update_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client, 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_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.update_data_attribute_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a DataAttributeBinding resource. All attributes within the + # DataAttributeBinding must be deleted before the DataAttributeBinding can be + # deleted. + # + # @overload delete_data_attribute_binding(request, options = nil) + # Pass arguments to `delete_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_attribute_binding(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @param etag [::String] + # Required. If the client provided etag value does not match the current etag + # value, the DeleteDataAttributeBindingRequest method returns an ABORTED + # error response. Etags must be used when calling the + # DeleteDataAttributeBinding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new + # + # # Call the delete_data_attribute_binding method. + # result = client.delete_data_attribute_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client, 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_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.delete_data_attribute_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists DataAttributeBinding resources in a project and location. + # + # @overload list_data_attribute_bindings(request, options = nil) + # Pass arguments to `list_data_attribute_bindings` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the Location: + # projects/\\{project_number}/locations/\\{location_id} + # @param page_size [::Integer] + # Optional. Maximum number of DataAttributeBindings to return. The service + # may return fewer than this value. If unspecified, at most 10 + # DataAttributeBindings will be returned. The maximum value is 1000; values + # above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListDataAttributeBindings` + # call. Provide this to retrieve the subsequent page. When paginating, all + # other parameters provided to `ListDataAttributeBindings` must match the + # call that provided the page token. + # @param filter [::String] + # Optional. Filter request. + # Filter using resource: filter=resource:"resource-name" + # Filter using attribute: filter=attributes:"attribute-name" + # Filter using attribute in paths list: + # filter=paths.attributes:"attribute-name" + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new + # + # # Call the list_data_attribute_bindings method. + # result = client.list_data_attribute_bindings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p item + # end + # + def list_data_attribute_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.list_data_attribute_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, "data_attribute_bindings", 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 + + ## + # Retrieves a DataAttributeBinding resource. + # + # @overload get_data_attribute_binding(request, options = nil) + # Pass arguments to `get_data_attribute_binding` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_attribute_binding(name: nil) + # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new + # + # # Call the get_data_attribute_binding method. + # result = client.get_data_attribute_binding request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. + # p result + # + def get_data_attribute_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.get_data_attribute_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a DataAttribute resource. + # + # @overload create_data_attribute(request, options = nil) + # Pass arguments to `create_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `create_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param data_attribute_id [::String] + # Required. DataAttribute identifier. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must be between 1-63 characters. + # * Must end with a number or a letter. + # * Must be unique within the DataTaxonomy. + # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. DataAttribute resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new + # + # # Call the create_data_attribute method. + # result = client.create_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_data_attribute.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.create_data_attribute request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a DataAttribute resource. + # + # @overload update_data_attribute(request, options = nil) + # Pass arguments to `update_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) + # Pass arguments to `update_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] + # Required. Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new + # + # # Call the update_data_attribute method. + # result = client.update_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_data_attribute.metadata.to_h + + # Set x-goog-api-client, 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_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.update_data_attribute request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Data Attribute resource. + # + # @overload delete_data_attribute(request, options = nil) + # Pass arguments to `delete_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_data_attribute(name: nil, etag: nil) + # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the DataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @param etag [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteDataAttribute method returns an ABORTED error response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new + # + # # Call the delete_data_attribute method. + # result = client.delete_data_attribute request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_data_attribute.metadata.to_h + + # Set x-goog-api-client, 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_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.delete_data_attribute request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Data Attribute resources in a DataTaxonomy. + # + # @overload list_data_attributes(request, options = nil) + # Pass arguments to `list_data_attributes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_data_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @param page_size [::Integer] + # Optional. Maximum number of DataAttributes to return. The service may + # return fewer than this value. If unspecified, at most 10 dataAttributes + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListDataAttributes` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListDataAttributes` must match the call that + # provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new + # + # # Call the list_data_attributes method. + # result = client.list_data_attributes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. + # p item + # end + # + def list_data_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_data_attributes.metadata.to_h + + # Set x-goog-api-client, 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_data_attributes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.list_data_attributes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, "data_attributes", 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 + + ## + # Retrieves a Data Attribute resource. + # + # @overload get_data_attribute(request, options = nil) + # Pass arguments to `get_data_attribute` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_data_attribute(name: nil) + # Pass arguments to `get_data_attribute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the dataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new + # + # # Call the get_data_attribute method. + # result = client.get_data_attribute request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. + # p result + # + def get_data_attribute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_data_attribute.metadata.to_h + + # Set x-goog-api-client, 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_data_attribute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_attribute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_taxonomy_service_stub.get_data_attribute request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataTaxonomyService REST API. + # + # This class represents the configuration for DataTaxonomyService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_taxonomy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_taxonomy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # 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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + 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 DataTaxonomyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_taxonomy + ## + # RPC-specific configuration for `update_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_taxonomy + ## + # RPC-specific configuration for `delete_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_taxonomy + ## + # RPC-specific configuration for `list_data_taxonomies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_taxonomies + ## + # RPC-specific configuration for `get_data_taxonomy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_taxonomy + ## + # RPC-specific configuration for `create_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute_binding + ## + # RPC-specific configuration for `update_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute_binding + ## + # RPC-specific configuration for `delete_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute_binding + ## + # RPC-specific configuration for `list_data_attribute_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attribute_bindings + ## + # RPC-specific configuration for `get_data_attribute_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute_binding + ## + # RPC-specific configuration for `create_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_attribute + ## + # RPC-specific configuration for `update_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_attribute + ## + # RPC-specific configuration for `delete_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_attribute + ## + # RPC-specific configuration for `list_data_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_attributes + ## + # RPC-specific configuration for `get_data_attribute` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_attribute + + # @private + def initialize parent_rpcs = nil + create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy + @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config + update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy + @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config + delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy + @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config + list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies + @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config + get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy + @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config + create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding + @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config + update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding + @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config + delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding + @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config + list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings + @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config + get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding + @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config + create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute + @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config + update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute + @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config + delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute + @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config + list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes + @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config + get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute + @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb new file mode 100644 index 000000000000..a26453898044 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_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 DataTaxonomyService + 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 DataTaxonomyService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTaxonomyService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb new file mode 100644 index 000000000000..8c9b093bd16f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb @@ -0,0 +1,1003 @@ +# 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 "google/cloud/dataplex/v1/data_taxonomy_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + module Rest + ## + # REST service stub for the DataTaxonomyService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + # @deprecated This service is deprecated and may be removed in the next major version update. + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_data_taxonomy", + 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_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_taxonomy", + 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_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_data_taxonomy", + 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_data_taxonomies REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] + # A result object deserialized from the server's reply + def list_data_taxonomies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_taxonomies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_taxonomies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.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_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # A result object deserialized from the server's reply + def get_data_taxonomy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_taxonomy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_taxonomy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_data_attribute_binding", + 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_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_attribute_binding", + 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_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_data_attribute_binding", + 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_data_attribute_bindings REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] + # A result object deserialized from the server's reply + def list_data_attribute_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attribute_bindings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_attribute_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.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_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # A result object deserialized from the server's reply + def get_data_attribute_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_binding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_attribute_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_data_attribute", + 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_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_attribute", + 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_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_data_attribute", + 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_data_attributes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] + # A result object deserialized from the server's reply + def list_data_attributes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attributes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_data_attributes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.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_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # A result object deserialized from the server's reply + def get_data_attribute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_attribute", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::DataAttribute.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 create_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTaxonomies", + body: "data_taxonomy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_taxonomy.name}", + body: "data_taxonomy", + matches: [ + ["data_taxonomy.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_taxonomies REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_taxonomies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataTaxonomies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_taxonomy REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_taxonomy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAttributeBindings", + body: "data_attribute_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_attribute_binding.name}", + body: "data_attribute_binding", + matches: [ + ["data_attribute_binding.name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_attribute_bindings REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_attribute_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataAttributeBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_attribute_binding REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_attribute_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/attributes", + body: "data_attribute", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_attribute.name}", + body: "data_attribute", + matches: [ + ["data_attribute.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_attributes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_data_attributes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attributes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_attribute REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_data_attribute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb new file mode 100644 index 000000000000..1afe91274d1d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb @@ -0,0 +1,77 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/data_taxonomy.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 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_taxonomy_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataTaxonomyService + # DataTaxonomyService enables attribute-based governance. The resources + # currently offered include DataTaxonomy and DataAttribute. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataTaxonomyService' + + # Create a DataTaxonomy resource. + rpc :CreateDataTaxonomy, ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Google::Longrunning::Operation + # Updates a DataTaxonomy resource. + rpc :UpdateDataTaxonomy, ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Google::Longrunning::Operation + # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + # must be deleted before the DataTaxonomy can be deleted. + rpc :DeleteDataTaxonomy, ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Google::Longrunning::Operation + # Lists DataTaxonomy resources in a project and location. + rpc :ListDataTaxonomies, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse + # Retrieves a DataTaxonomy resource. + rpc :GetDataTaxonomy, ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Google::Cloud::Dataplex::V1::DataTaxonomy + # Create a DataAttributeBinding resource. + rpc :CreateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Google::Longrunning::Operation + # Updates a DataAttributeBinding resource. + rpc :UpdateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Google::Longrunning::Operation + # Deletes a DataAttributeBinding resource. All attributes within the + # DataAttributeBinding must be deleted before the DataAttributeBinding can be + # deleted. + rpc :DeleteDataAttributeBinding, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Google::Longrunning::Operation + # Lists DataAttributeBinding resources in a project and location. + rpc :ListDataAttributeBindings, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse + # Retrieves a DataAttributeBinding resource. + rpc :GetDataAttributeBinding, ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Google::Cloud::Dataplex::V1::DataAttributeBinding + # Create a DataAttribute resource. + rpc :CreateDataAttribute, ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Google::Longrunning::Operation + # Updates a DataAttribute resource. + rpc :UpdateDataAttribute, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Google::Longrunning::Operation + # Deletes a Data Attribute resource. + rpc :DeleteDataAttribute, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Google::Longrunning::Operation + # Lists Data Attribute resources in a DataTaxonomy. + rpc :ListDataAttributes, ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse + # Retrieves a Data Attribute resource. + rpc :GetDataAttribute, ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Google::Cloud::Dataplex::V1::DataAttribute + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb new file mode 100644 index 000000000000..7d80f663f8ca --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" + +require "google/cloud/dataplex/v1/dataplex_service/credentials" +require "google/cloud/dataplex/v1/dataplex_service/paths" +require "google/cloud/dataplex/v1/dataplex_service/operations" +require "google/cloud/dataplex/v1/dataplex_service/client" +require "google/cloud/dataplex/v1/dataplex_service/rest" + +module Google + module Cloud + module Dataplex + module V1 + ## + # Dataplex service provides data lakes as a service. The primary resources + # offered by this service are Lakes, Zones and Assets which collectively allow + # a data administrator to organize, manage, secure and catalog data across + # their organization located across cloud projects in a variety of storage + # systems including Cloud Storage and BigQuery. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/dataplex/v1/dataplex_service" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/dataplex/v1/dataplex_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module DataplexService + end + end + end + end +end + +helper_path = ::File.join __dir__, "dataplex_service", "helpers.rb" +require "google/cloud/dataplex/v1/dataplex_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb new file mode 100644 index 000000000000..7e66861d6007 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb @@ -0,0 +1,3366 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + ## + # Client for the DataplexService service. + # + # Dataplex service provides data lakes as a service. The primary resources + # offered by this service are Lakes, Zones and Assets which collectively allow + # a data administrator to organize, manage, secure and catalog data across + # their organization located across cloud projects in a variety of storage + # systems including Cloud Storage and BigQuery. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dataplex_service_stub + + ## + # Configure the DataplexService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataplexService clients + # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_lake.timeout = 60.0 + + default_config.rpcs.update_lake.timeout = 60.0 + + default_config.rpcs.delete_lake.timeout = 60.0 + + default_config.rpcs.list_lakes.timeout = 60.0 + default_config.rpcs.list_lakes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_lake.timeout = 60.0 + default_config.rpcs.get_lake.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_lake_actions.timeout = 60.0 + default_config.rpcs.list_lake_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_zone.timeout = 60.0 + + default_config.rpcs.update_zone.timeout = 60.0 + + default_config.rpcs.delete_zone.timeout = 60.0 + + default_config.rpcs.list_zones.timeout = 60.0 + default_config.rpcs.list_zones.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_zone.timeout = 60.0 + default_config.rpcs.get_zone.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_zone_actions.timeout = 60.0 + default_config.rpcs.list_zone_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_asset.timeout = 60.0 + + default_config.rpcs.update_asset.timeout = 60.0 + + default_config.rpcs.delete_asset.timeout = 60.0 + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_asset.timeout = 60.0 + default_config.rpcs.get_asset.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_asset_actions.timeout = 60.0 + default_config.rpcs.list_asset_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + + default_config.rpcs.update_task.timeout = 60.0 + + default_config.rpcs.delete_task.timeout = 60.0 + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @dataplex_service_stub.universe_domain + end + + ## + # Create a new DataplexService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataplexService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/dataplex/v1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @dataplex_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Dataplex::V1::DataplexService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @dataplex_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + config.logger = @dataplex_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + config.logger = @dataplex_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataplexService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dataplex_service_stub.logger + end + + # Service calls + + ## + # Creates a lake resource. + # + # @overload create_lake(request, options = nil) + # Pass arguments to `create_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) + # Pass arguments to `create_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the lake location, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param lake_id [::String] + # Required. Lake identifier. + # This ID will be used to generate names such as database and dataset names + # when publishing metadata to Hive Metastore and BigQuery. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique within the customer project / location. + # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Lake resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new + # + # # Call the create_lake method. + # result = client.create_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_lake.metadata.to_h + + # Set x-goog-api-client, 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_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_lake, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a lake resource. + # + # @overload update_lake(request, options = nil) + # Pass arguments to `update_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) + # Pass arguments to `update_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new + # + # # Call the update_lake method. + # result = client.update_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_lake.metadata.to_h + + # Set x-goog-api-client, 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.lake&.name + header_params["lake.name"] = request.lake.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_lake, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a lake resource. All zones within the lake must be deleted before + # the lake can be deleted. + # + # @overload delete_lake(request, options = nil) + # Pass arguments to `delete_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_lake(name: nil) + # Pass arguments to `delete_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new + # + # # Call the delete_lake method. + # result = client.delete_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_lake.metadata.to_h + + # Set x-goog-api-client, 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_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_lake, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists lake resources in a project and location. + # + # @overload list_lakes(request, options = nil) + # Pass arguments to `list_lakes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lakes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the lake location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of Lakes to return. The service may return fewer + # than this value. If unspecified, at most 10 lakes will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListLakes` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListLakes` must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new + # + # # Call the list_lakes method. + # result = client.list_lakes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. + # p item + # end + # + def list_lakes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_lakes.metadata.to_h + + # Set x-goog-api-client, 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_lakes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lakes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_lakes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lakes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a lake resource. + # + # @overload get_lake(request, options = nil) + # Pass arguments to `get_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_lake(name: nil) + # Pass arguments to `get_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Lake] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Lake] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new + # + # # Call the get_lake method. + # result = client.get_lake request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. + # p result + # + def get_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_lake.metadata.to_h + + # Set x-goog-api-client, 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_lake.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_lake, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a lake. + # + # @overload list_lake_actions(request, options = nil) + # Pass arguments to `list_lake_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lake_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of actions to return. The service may return fewer + # than this value. If unspecified, at most 10 actions will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListLakeActions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListLakeActions` must match the call that provided + # the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new + # + # # Call the list_lake_actions method. + # result = client.list_lake_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_lake_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_lake_actions.metadata.to_h + + # Set x-goog-api-client, 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_lake_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_lake_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_lake_actions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a zone resource within a lake. + # + # @overload create_zone(request, options = nil) + # Pass arguments to `create_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) + # Pass arguments to `create_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param zone_id [::String] + # Required. Zone identifier. + # This ID will be used to generate names such as database and dataset names + # when publishing metadata to Hive Metastore and BigQuery. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique across all lakes from all locations in a project. + # * Must not be one of the reserved IDs (i.e. "default", "global-temp") + # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Zone resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new + # + # # Call the create_zone method. + # result = client.create_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_zone.metadata.to_h + + # Set x-goog-api-client, 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_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_zone, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a zone resource. + # + # @overload update_zone(request, options = nil) + # Pass arguments to `update_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) + # Pass arguments to `update_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new + # + # # Call the update_zone method. + # result = client.update_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_zone.metadata.to_h + + # Set x-goog-api-client, 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.zone&.name + header_params["zone.name"] = request.zone.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_zone, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a zone resource. All assets within a zone must be deleted before + # the zone can be deleted. + # + # @overload delete_zone(request, options = nil) + # Pass arguments to `delete_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_zone(name: nil) + # Pass arguments to `delete_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new + # + # # Call the delete_zone method. + # result = client.delete_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_zone.metadata.to_h + + # Set x-goog-api-client, 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_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_zone, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists zone resources in a lake. + # + # @overload list_zones(request, options = nil) + # Pass arguments to `list_zones` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_zones` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of zones to return. The service may return fewer + # than this value. If unspecified, at most 10 zones will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListZones` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListZones` must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new + # + # # Call the list_zones method. + # result = client.list_zones request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. + # p item + # end + # + def list_zones request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_zones.metadata.to_h + + # Set x-goog-api-client, 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_zones.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_zones.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_zones, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zones, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a zone resource. + # + # @overload get_zone(request, options = nil) + # Pass arguments to `get_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_zone(name: nil) + # Pass arguments to `get_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Zone] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Zone] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new + # + # # Call the get_zone method. + # result = client.get_zone request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. + # p result + # + def get_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_zone.metadata.to_h + + # Set x-goog-api-client, 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_zone.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_zone, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a zone. + # + # @overload list_zone_actions(request, options = nil) + # Pass arguments to `list_zone_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_zone_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of actions to return. The service may return fewer + # than this value. If unspecified, at most 10 actions will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListZoneActions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListZoneActions` must match the call that provided + # the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new + # + # # Call the list_zone_actions method. + # result = client.list_zone_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_zone_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_zone_actions.metadata.to_h + + # Set x-goog-api-client, 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_zone_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_zone_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_zone_actions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an asset resource. + # + # @overload create_asset(request, options = nil) + # Pass arguments to `create_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) + # Pass arguments to `create_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param asset_id [::String] + # Required. Asset identifier. + # This ID will be used to generate names such as table names when publishing + # metadata to Hive Metastore and BigQuery. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique within the zone. + # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Asset resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new + # + # # Call the create_asset method. + # result = client.create_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_asset.metadata.to_h + + # Set x-goog-api-client, 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_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an asset resource. + # + # @overload update_asset(request, options = nil) + # Pass arguments to `update_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) + # Pass arguments to `update_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new + # + # # Call the update_asset method. + # result = client.update_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_asset.metadata.to_h + + # Set x-goog-api-client, 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.asset&.name + header_params["asset.name"] = request.asset.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an asset resource. The referenced storage resource is detached + # (default) or deleted based on the associated Lifecycle policy. + # + # @overload delete_asset(request, options = nil) + # Pass arguments to `delete_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_asset(name: nil) + # Pass arguments to `delete_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new + # + # # Call the delete_asset method. + # result = client.delete_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_asset.metadata.to_h + + # Set x-goog-api-client, 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_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_asset, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists asset resources in a zone. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of asset to return. The service may return fewer + # than this value. If unspecified, at most 10 assets will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListAssets` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListAssets` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, 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_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an asset resource. + # + # @overload get_asset(request, options = nil) + # Pass arguments to `get_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_asset(name: nil) + # Pass arguments to `get_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Asset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Asset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new + # + # # Call the get_asset method. + # result = client.get_asset request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. + # p result + # + def get_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_asset.metadata.to_h + + # Set x-goog-api-client, 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_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_asset, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in an asset. + # + # @overload list_asset_actions(request, options = nil) + # Pass arguments to `list_asset_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_asset_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of actions to return. The service may return fewer + # than this value. If unspecified, at most 10 actions will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListAssetActions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListAssetActions` must match the call that provided + # the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new + # + # # Call the list_asset_actions method. + # result = client.list_asset_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_asset_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_asset_actions.metadata.to_h + + # Set x-goog-api-client, 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_asset_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_asset_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_asset_actions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task resource within a lake. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param task_id [::String] + # Required. Task identifier. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Task resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, 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_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :create_task, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the task resource. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_task(update_mask: nil, task: nil, validate_only: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client, 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.task&.name + header_params["task.name"] = request.task.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :update_task, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the task resource. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, 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_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :delete_task, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tasks under the given lake. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of tasks to return. The service may return fewer + # than this value. If unspecified, at most 10 tasks will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListZones` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListZones` must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, 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_tasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_tasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get task resource. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Task] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Task] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, 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_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Jobs under the given task. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of jobs to return. The service may return fewer + # than this value. If unspecified, at most 10 jobs will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListJobs` call. Provide this + # to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListJobs` must match the call that provided the page + # token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, 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_jobs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_jobs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run an on demand execution of a Task. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_task(name: nil, labels: nil, args: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param labels [::Hash{::String => ::String}] + # Optional. User-defined labels for the task. If the map is left empty, the + # task will run with existing labels from task definition. If the map + # contains an entry with a new key, the same will be added to existing set of + # labels. If the map contains an entry with an existing label key in task + # definition, the task will run with new label value for that entry. Clearing + # an existing label will require label value to be explicitly set to a hyphen + # "-". The label value cannot be empty. + # @param args [::Hash{::String => ::String}] + # Optional. Execution spec arguments. If the map is left empty, the task will + # run with existing execution spec args from task definition. If the map + # contains an entry with a new key, the same will be added to existing set of + # args. If the map contains an entry with an existing arg key in task + # definition, the task will run with new arg value for that entry. Clearing + # an existing arg will require arg value to be explicitly set to a hyphen + # "-". The arg value cannot be empty. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client, 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.run_task.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :run_task, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get job resource. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Job] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Job] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, 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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :get_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel jobs running for the task resource. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_job(name: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_job.metadata.to_h + + # Set x-goog-api-client, 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_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataplexService API. + # + # This class represents the configuration for DataplexService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_lake to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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::Cloud::Dataplex::V1::DataplexService::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 DataplexService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lake + ## + # RPC-specific configuration for `update_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lake + ## + # RPC-specific configuration for `delete_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lake + ## + # RPC-specific configuration for `list_lakes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lakes + ## + # RPC-specific configuration for `get_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lake + ## + # RPC-specific configuration for `list_lake_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lake_actions + ## + # RPC-specific configuration for `create_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :create_zone + ## + # RPC-specific configuration for `update_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :update_zone + ## + # RPC-specific configuration for `delete_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_zone + ## + # RPC-specific configuration for `list_zones` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zones + ## + # RPC-specific configuration for `get_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :get_zone + ## + # RPC-specific configuration for `list_zone_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zone_actions + ## + # RPC-specific configuration for `create_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_asset + ## + # RPC-specific configuration for `update_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_asset + ## + # RPC-specific configuration for `delete_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_asset + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `get_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_asset + ## + # RPC-specific configuration for `list_asset_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_asset_actions + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + + # @private + def initialize parent_rpcs = nil + create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake + @create_lake = ::Gapic::Config::Method.new create_lake_config + update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake + @update_lake = ::Gapic::Config::Method.new update_lake_config + delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake + @delete_lake = ::Gapic::Config::Method.new delete_lake_config + list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes + @list_lakes = ::Gapic::Config::Method.new list_lakes_config + get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake + @get_lake = ::Gapic::Config::Method.new get_lake_config + list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions + @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config + create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone + @create_zone = ::Gapic::Config::Method.new create_zone_config + update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone + @update_zone = ::Gapic::Config::Method.new update_zone_config + delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone + @delete_zone = ::Gapic::Config::Method.new delete_zone_config + list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones + @list_zones = ::Gapic::Config::Method.new list_zones_config + get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone + @get_zone = ::Gapic::Config::Method.new get_zone_config + list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions + @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config + create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset + @create_asset = ::Gapic::Config::Method.new create_asset_config + update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset + @update_asset = ::Gapic::Config::Method.new update_asset_config + delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset + @delete_asset = ::Gapic::Config::Method.new delete_asset_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset + @get_asset = ::Gapic::Config::Method.new get_asset_config + list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions + @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb new file mode 100644 index 000000000000..77c5a1301f1c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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 "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # Credentials for the DataplexService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb new file mode 100644 index 000000000000..f00cf4f809df --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_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 DataplexService + # 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 DataplexService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb new file mode 100644 index 000000000000..115a15d7bce1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb @@ -0,0 +1,157 @@ +# 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 + module DataplexService + # Path helper methods for the DataplexService API. + module Paths + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param asset [String] + # + # @return [::String] + def asset_path project:, location:, lake:, zone:, asset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/assets/#{asset}" + end + + ## + # Create a fully-qualified Job resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param task [String] + # @param job [String] + # + # @return [::String] + def job_path project:, location:, lake:, task:, job: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "task cannot contain /" if task.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}/jobs/#{job}" + end + + ## + # Create a fully-qualified Lake resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # + # @return [::String] + def lake_path project:, location:, lake: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Task resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param task [String] + # + # @return [::String] + def task_path project:, location:, lake:, task: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}" + end + + ## + # Create a fully-qualified Zone resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # + # @return [::String] + def zone_path project:, location:, lake:, zone: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb new file mode 100644 index 000000000000..6f379d24b3d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/dataplex_service/credentials" +require "google/cloud/dataplex/v1/dataplex_service/paths" +require "google/cloud/dataplex/v1/dataplex_service/rest/operations" +require "google/cloud/dataplex/v1/dataplex_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # Dataplex service provides data lakes as a service. The primary resources + # offered by this service are Lakes, Zones and Assets which collectively allow + # a data administrator to organize, manage, secure and catalog data across + # their organization located across cloud projects in a variety of storage + # systems including Cloud Storage and BigQuery. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/dataplex_service/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module DataplexService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/dataplex_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb new file mode 100644 index 000000000000..063252549d7f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb @@ -0,0 +1,3143 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/service_pb" +require "google/cloud/dataplex/v1/dataplex_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + module Rest + ## + # REST client for the DataplexService service. + # + # Dataplex service provides data lakes as a service. The primary resources + # offered by this service are Lakes, Zones and Assets which collectively allow + # a data administrator to organize, manage, secure and catalog data across + # their organization located across cloud projects in a variety of storage + # systems including Cloud Storage and BigQuery. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dataplex_service_stub + + ## + # Configure the DataplexService Client class. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataplexService clients + # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_lake.timeout = 60.0 + + default_config.rpcs.update_lake.timeout = 60.0 + + default_config.rpcs.delete_lake.timeout = 60.0 + + default_config.rpcs.list_lakes.timeout = 60.0 + default_config.rpcs.list_lakes.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_lake.timeout = 60.0 + default_config.rpcs.get_lake.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_lake_actions.timeout = 60.0 + default_config.rpcs.list_lake_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_zone.timeout = 60.0 + + default_config.rpcs.update_zone.timeout = 60.0 + + default_config.rpcs.delete_zone.timeout = 60.0 + + default_config.rpcs.list_zones.timeout = 60.0 + default_config.rpcs.list_zones.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_zone.timeout = 60.0 + default_config.rpcs.get_zone.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_zone_actions.timeout = 60.0 + default_config.rpcs.list_zone_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_asset.timeout = 60.0 + + default_config.rpcs.update_asset.timeout = 60.0 + + default_config.rpcs.delete_asset.timeout = 60.0 + + default_config.rpcs.list_assets.timeout = 60.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_asset.timeout = 60.0 + default_config.rpcs.get_asset.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_asset_actions.timeout = 60.0 + default_config.rpcs.list_asset_actions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_task.timeout = 60.0 + + default_config.rpcs.update_task.timeout = 60.0 + + default_config.rpcs.delete_task.timeout = 60.0 + + default_config.rpcs.list_tasks.timeout = 60.0 + default_config.rpcs.list_tasks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_task.timeout = 60.0 + default_config.rpcs.get_task.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_jobs.timeout = 60.0 + default_config.rpcs.list_jobs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_job.timeout = 60.0 + default_config.rpcs.get_job.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.cancel_job.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @dataplex_service_stub.universe_domain + end + + ## + # Create a new DataplexService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataplexService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @dataplex_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @dataplex_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 = @dataplex_service_stub.endpoint + config.universe_domain = @dataplex_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @dataplex_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dataplex_service_stub.logger + end + + # Service calls + + ## + # Creates a lake resource. + # + # @overload create_lake(request, options = nil) + # Pass arguments to `create_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) + # Pass arguments to `create_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the lake location, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @param lake_id [::String] + # Required. Lake identifier. + # This ID will be used to generate names such as database and dataset names + # when publishing metadata to Hive Metastore and BigQuery. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique within the customer project / location. + # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Lake resource + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new + # + # # Call the create_lake method. + # result = client.create_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_lake.metadata.to_h + + # Set x-goog-api-client, 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_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_lake request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a lake resource. + # + # @overload update_lake(request, options = nil) + # Pass arguments to `update_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) + # Pass arguments to `update_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new + # + # # Call the update_lake method. + # result = client.update_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_lake.metadata.to_h + + # Set x-goog-api-client, 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_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_lake request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a lake resource. All zones within the lake must be deleted before + # the lake can be deleted. + # + # @overload delete_lake(request, options = nil) + # Pass arguments to `delete_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_lake(name: nil) + # Pass arguments to `delete_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new + # + # # Call the delete_lake method. + # result = client.delete_lake request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_lake.metadata.to_h + + # Set x-goog-api-client, 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_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_lake request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists lake resources in a project and location. + # + # @overload list_lakes(request, options = nil) + # Pass arguments to `list_lakes` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_lakes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the lake location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. Maximum number of Lakes to return. The service may return fewer + # than this value. If unspecified, at most 10 lakes will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListLakes` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListLakes` must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new + # + # # Call the list_lakes method. + # result = client.list_lakes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. + # p item + # end + # + def list_lakes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_lakes.metadata.to_h + + # Set x-goog-api-client, 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_lakes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lakes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_lakes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lakes, "lakes", 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 + + ## + # Retrieves a lake resource. + # + # @overload get_lake(request, options = nil) + # Pass arguments to `get_lake` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_lake(name: nil) + # Pass arguments to `get_lake` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Lake] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new + # + # # Call the get_lake method. + # result = client.get_lake request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. + # p result + # + def get_lake request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_lake.metadata.to_h + + # Set x-goog-api-client, 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_lake.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_lake.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_lake request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a lake. + # + # @overload list_lake_actions(request, options = nil) + # Pass arguments to `list_lake_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_lake_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of actions to return. The service may return fewer + # than this value. If unspecified, at most 10 actions will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListLakeActions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListLakeActions` must match the call that provided + # the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new + # + # # Call the list_lake_actions method. + # result = client.list_lake_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_lake_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_lake_actions.metadata.to_h + + # Set x-goog-api-client, 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_lake_actions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_lake_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_lake_actions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, "actions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a zone resource within a lake. + # + # @overload create_zone(request, options = nil) + # Pass arguments to `create_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) + # Pass arguments to `create_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param zone_id [::String] + # Required. Zone identifier. + # This ID will be used to generate names such as database and dataset names + # when publishing metadata to Hive Metastore and BigQuery. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique across all lakes from all locations in a project. + # * Must not be one of the reserved IDs (i.e. "default", "global-temp") + # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Zone resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new + # + # # Call the create_zone method. + # result = client.create_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_zone.metadata.to_h + + # Set x-goog-api-client, 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_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_zone request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a zone resource. + # + # @overload update_zone(request, options = nil) + # Pass arguments to `update_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) + # Pass arguments to `update_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new + # + # # Call the update_zone method. + # result = client.update_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_zone.metadata.to_h + + # Set x-goog-api-client, 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_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_zone request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a zone resource. All assets within a zone must be deleted before + # the zone can be deleted. + # + # @overload delete_zone(request, options = nil) + # Pass arguments to `delete_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_zone(name: nil) + # Pass arguments to `delete_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new + # + # # Call the delete_zone method. + # result = client.delete_zone request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_zone.metadata.to_h + + # Set x-goog-api-client, 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_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_zone request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists zone resources in a lake. + # + # @overload list_zones(request, options = nil) + # Pass arguments to `list_zones` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_zones` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of zones to return. The service may return fewer + # than this value. If unspecified, at most 10 zones will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListZones` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListZones` must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new + # + # # Call the list_zones method. + # result = client.list_zones request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. + # p item + # end + # + def list_zones request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_zones.metadata.to_h + + # Set x-goog-api-client, 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_zones.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_zones.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_zones request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zones, "zones", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a zone resource. + # + # @overload get_zone(request, options = nil) + # Pass arguments to `get_zone` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_zone(name: nil) + # Pass arguments to `get_zone` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Zone] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new + # + # # Call the get_zone method. + # result = client.get_zone request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. + # p result + # + def get_zone request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_zone.metadata.to_h + + # Set x-goog-api-client, 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_zone.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_zone.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_zone request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in a zone. + # + # @overload list_zone_actions(request, options = nil) + # Pass arguments to `list_zone_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_zone_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of actions to return. The service may return fewer + # than this value. If unspecified, at most 10 actions will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListZoneActions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListZoneActions` must match the call that provided + # the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new + # + # # Call the list_zone_actions method. + # result = client.list_zone_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_zone_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_zone_actions.metadata.to_h + + # Set x-goog-api-client, 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_zone_actions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_zone_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_zone_actions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, "actions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an asset resource. + # + # @overload create_asset(request, options = nil) + # Pass arguments to `create_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) + # Pass arguments to `create_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param asset_id [::String] + # Required. Asset identifier. + # This ID will be used to generate names such as table names when publishing + # metadata to Hive Metastore and BigQuery. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique within the zone. + # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Asset resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new + # + # # Call the create_asset method. + # result = client.create_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_asset.metadata.to_h + + # Set x-goog-api-client, 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_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an asset resource. + # + # @overload update_asset(request, options = nil) + # Pass arguments to `update_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) + # Pass arguments to `update_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new + # + # # Call the update_asset method. + # result = client.update_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_asset.metadata.to_h + + # Set x-goog-api-client, 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_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an asset resource. The referenced storage resource is detached + # (default) or deleted based on the associated Lifecycle policy. + # + # @overload delete_asset(request, options = nil) + # Pass arguments to `delete_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_asset(name: nil) + # Pass arguments to `delete_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new + # + # # Call the delete_asset method. + # result = client.delete_asset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_asset.metadata.to_h + + # Set x-goog-api-client, 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_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_asset request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists asset resources in a zone. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of asset to return. The service may return fewer + # than this value. If unspecified, at most 10 assets will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListAssets` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListAssets` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, 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_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_assets, "assets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an asset resource. + # + # @overload get_asset(request, options = nil) + # Pass arguments to `get_asset` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_asset(name: nil) + # Pass arguments to `get_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Asset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new + # + # # Call the get_asset method. + # result = client.get_asset request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. + # p result + # + def get_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_asset.metadata.to_h + + # Set x-goog-api-client, 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_asset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_asset request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists action resources in an asset. + # + # @overload list_asset_actions(request, options = nil) + # Pass arguments to `list_asset_actions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_asset_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of actions to return. The service may return fewer + # than this value. If unspecified, at most 10 actions will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListAssetActions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListAssetActions` must match the call that provided + # the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new + # + # # Call the list_asset_actions method. + # result = client.list_asset_actions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + # p item + # end + # + def list_asset_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_asset_actions.metadata.to_h + + # Set x-goog-api-client, 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_asset_actions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_asset_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_asset_actions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, "actions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a task resource within a lake. + # + # @overload create_task(request, options = nil) + # Pass arguments to `create_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) + # Pass arguments to `create_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param task_id [::String] + # Required. Task identifier. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Task resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new + # + # # Call the create_task method. + # result = client.create_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_task.metadata.to_h + + # Set x-goog-api-client, 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_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.create_task request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the task resource. + # + # @overload update_task(request, options = nil) + # Pass arguments to `update_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_task(update_mask: nil, task: nil, validate_only: nil) + # Pass arguments to `update_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new + # + # # Call the update_task method. + # result = client.update_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_task.metadata.to_h + + # Set x-goog-api-client, 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_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.update_task request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete the task resource. + # + # @overload delete_task(request, options = nil) + # Pass arguments to `delete_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_task(name: nil) + # Pass arguments to `delete_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new + # + # # Call the delete_task method. + # result = client.delete_task request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_task.metadata.to_h + + # Set x-goog-api-client, 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_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.delete_task request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists tasks under the given lake. + # + # @overload list_tasks(request, options = nil) + # Pass arguments to `list_tasks` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_tasks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of tasks to return. The service may return fewer + # than this value. If unspecified, at most 10 tasks will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListZones` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListZones` must match the call that provided the page token. + # @param filter [::String] + # Optional. Filter request. + # @param order_by [::String] + # Optional. Order by fields for the result. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new + # + # # Call the list_tasks method. + # result = client.list_tasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. + # p item + # end + # + def list_tasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_tasks.metadata.to_h + + # Set x-goog-api-client, 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_tasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_tasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_tasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_tasks, "tasks", 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 task resource. + # + # @overload get_task(request, options = nil) + # Pass arguments to `get_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_task(name: nil) + # Pass arguments to `get_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Task] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new + # + # # Call the get_task method. + # result = client.get_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Task. + # p result + # + def get_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_task.metadata.to_h + + # Set x-goog-api-client, 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_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Jobs under the given task. + # + # @overload list_jobs(request, options = nil) + # Pass arguments to `list_jobs` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_jobs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of jobs to return. The service may return fewer + # than this value. If unspecified, at most 10 jobs will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. Page token received from a previous `ListJobs` call. Provide this + # to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListJobs` must match the call that provided the page + # token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new + # + # # Call the list_jobs method. + # result = client.list_jobs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. + # p item + # end + # + def list_jobs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_jobs.metadata.to_h + + # Set x-goog-api-client, 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_jobs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_jobs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.list_jobs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_jobs, "jobs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Run an on demand execution of a Task. + # + # @overload run_task(request, options = nil) + # Pass arguments to `run_task` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_task(name: nil, labels: nil, args: nil) + # Pass arguments to `run_task` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @param labels [::Hash{::String => ::String}] + # Optional. User-defined labels for the task. If the map is left empty, the + # task will run with existing labels from task definition. If the map + # contains an entry with a new key, the same will be added to existing set of + # labels. If the map contains an entry with an existing label key in task + # definition, the task will run with new label value for that entry. Clearing + # an existing label will require label value to be explicitly set to a hyphen + # "-". The label value cannot be empty. + # @param args [::Hash{::String => ::String}] + # Optional. Execution spec arguments. If the map is left empty, the task will + # run with existing execution spec args from task definition. If the map + # contains an entry with a new key, the same will be added to existing set of + # args. If the map contains an entry with an existing arg key in task + # definition, the task will run with new arg value for that entry. Clearing + # an existing arg will require arg value to be explicitly set to a hyphen + # "-". The arg value cannot be empty. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new + # + # # Call the run_task method. + # result = client.run_task request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. + # p result + # + def run_task request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_task.metadata.to_h + + # Set x-goog-api-client, 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.run_task.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_task.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.run_task request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get job resource. + # + # @overload get_job(request, options = nil) + # Pass arguments to `get_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_job(name: nil) + # Pass arguments to `get_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Job] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetJobRequest.new + # + # # Call the get_job method. + # result = client.get_job request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Job. + # p result + # + def get_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_job.metadata.to_h + + # Set x-goog-api-client, 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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.get_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancel jobs running for the task resource. + # + # @overload cancel_job(request, options = nil) + # Pass arguments to `cancel_job` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_job(name: nil) + # Pass arguments to `cancel_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new + # + # # Call the cancel_job method. + # result = client.cancel_job request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_job.metadata.to_h + + # Set x-goog-api-client, 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_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataplex_service_stub.cancel_job request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DataplexService REST API. + # + # This class represents the configuration for DataplexService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_lake to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_lake.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # 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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + 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 DataplexService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :create_lake + ## + # RPC-specific configuration for `update_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :update_lake + ## + # RPC-specific configuration for `delete_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_lake + ## + # RPC-specific configuration for `list_lakes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lakes + ## + # RPC-specific configuration for `get_lake` + # @return [::Gapic::Config::Method] + # + attr_reader :get_lake + ## + # RPC-specific configuration for `list_lake_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_lake_actions + ## + # RPC-specific configuration for `create_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :create_zone + ## + # RPC-specific configuration for `update_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :update_zone + ## + # RPC-specific configuration for `delete_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_zone + ## + # RPC-specific configuration for `list_zones` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zones + ## + # RPC-specific configuration for `get_zone` + # @return [::Gapic::Config::Method] + # + attr_reader :get_zone + ## + # RPC-specific configuration for `list_zone_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_zone_actions + ## + # RPC-specific configuration for `create_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_asset + ## + # RPC-specific configuration for `update_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_asset + ## + # RPC-specific configuration for `delete_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_asset + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `get_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_asset + ## + # RPC-specific configuration for `list_asset_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_asset_actions + ## + # RPC-specific configuration for `create_task` + # @return [::Gapic::Config::Method] + # + attr_reader :create_task + ## + # RPC-specific configuration for `update_task` + # @return [::Gapic::Config::Method] + # + attr_reader :update_task + ## + # RPC-specific configuration for `delete_task` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_task + ## + # RPC-specific configuration for `list_tasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_tasks + ## + # RPC-specific configuration for `get_task` + # @return [::Gapic::Config::Method] + # + attr_reader :get_task + ## + # RPC-specific configuration for `list_jobs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_jobs + ## + # RPC-specific configuration for `run_task` + # @return [::Gapic::Config::Method] + # + attr_reader :run_task + ## + # RPC-specific configuration for `get_job` + # @return [::Gapic::Config::Method] + # + attr_reader :get_job + ## + # RPC-specific configuration for `cancel_job` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_job + + # @private + def initialize parent_rpcs = nil + create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake + @create_lake = ::Gapic::Config::Method.new create_lake_config + update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake + @update_lake = ::Gapic::Config::Method.new update_lake_config + delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake + @delete_lake = ::Gapic::Config::Method.new delete_lake_config + list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes + @list_lakes = ::Gapic::Config::Method.new list_lakes_config + get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake + @get_lake = ::Gapic::Config::Method.new get_lake_config + list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions + @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config + create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone + @create_zone = ::Gapic::Config::Method.new create_zone_config + update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone + @update_zone = ::Gapic::Config::Method.new update_zone_config + delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone + @delete_zone = ::Gapic::Config::Method.new delete_zone_config + list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones + @list_zones = ::Gapic::Config::Method.new list_zones_config + get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone + @get_zone = ::Gapic::Config::Method.new get_zone_config + list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions + @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config + create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset + @create_asset = ::Gapic::Config::Method.new create_asset_config + update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset + @update_asset = ::Gapic::Config::Method.new update_asset_config + delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset + @delete_asset = ::Gapic::Config::Method.new delete_asset_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset + @get_asset = ::Gapic::Config::Method.new get_asset_config + list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions + @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task + @create_task = ::Gapic::Config::Method.new create_task_config + update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task + @update_task = ::Gapic::Config::Method.new update_task_config + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task + @delete_task = ::Gapic::Config::Method.new delete_task_config + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks + @list_tasks = ::Gapic::Config::Method.new list_tasks_config + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task + @get_task = ::Gapic::Config::Method.new get_task_config + list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs + @list_jobs = ::Gapic::Config::Method.new list_jobs_config + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task + @run_task = ::Gapic::Config::Method.new run_task_config + get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job + @get_job = ::Gapic::Config::Method.new get_job_config + cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job + @cancel_job = ::Gapic::Config::Method.new cancel_job_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb new file mode 100644 index 000000000000..20bae9658b48 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_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 DataplexService + 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 DataplexService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DataplexService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb new file mode 100644 index 000000000000..5fc1c42bac92 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb @@ -0,0 +1,1738 @@ +# 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 "google/cloud/dataplex/v1/service_pb" + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + module Rest + ## + # REST service stub for the DataplexService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_lake", + 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_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_lake", + 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_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_lake", + 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_lakes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] + # A result object deserialized from the server's reply + def list_lakes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lakes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_lakes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.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_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Lake] + # A result object deserialized from the server's reply + def get_lake request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_lake_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_lake", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Lake.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_lake_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # A result object deserialized from the server's reply + def list_lake_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_lake_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_lake_actions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_zone", + 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_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_zone", + 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_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_zone", + 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_zones REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListZonesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListZonesResponse] + # A result object deserialized from the server's reply + def list_zones request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_zones_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_zones", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.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_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Zone] + # A result object deserialized from the server's reply + def get_zone request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_zone_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_zone", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Zone.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_zone_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # A result object deserialized from the server's reply + def list_zone_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_zone_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_zone_actions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_asset", + 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_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_asset", + 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_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_asset", + 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_assets REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListAssetsResponse] + # A result object deserialized from the server's reply + def list_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.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_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Asset] + # A result object deserialized from the server's reply + def get_asset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_asset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_asset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Asset.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_asset_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] + # A result object deserialized from the server's reply + def list_asset_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_asset_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_asset_actions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_task", + 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_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_task", + 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_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_task", + 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_tasks REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] + # A result object deserialized from the server's reply + def list_tasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_tasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.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_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Task] + # A result object deserialized from the server's reply + def get_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Task.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_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListJobsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListJobsResponse] + # A result object deserialized from the server's reply + def list_jobs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_jobs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the run_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] + # A result object deserialized from the server's reply + def run_task request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_task", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.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_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Job] + # A result object deserialized from the server's reply + def get_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Job.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_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_job", + 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 create_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/lakes", + body: "lake", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{lake.name}", + body: "lake", + matches: [ + ["lake.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lakes REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_lakes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/lakes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_lake REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_lake_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_lake_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_lake_actions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/actions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/zones", + body: "zone", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{zone.name}", + body: "zone", + matches: [ + ["zone.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_zones REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_zones_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/zones", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_zone REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_zone_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_zone_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_zone_actions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/actions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets", + body: "asset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{asset.name}", + body: "asset", + matches: [ + ["asset.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assets REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_asset REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_asset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_asset_actions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_asset_actions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/actions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/tasks", + body: "task", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{task.name}", + body: "task", + matches: [ + ["task.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_tasks REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_tasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/tasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_jobs REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_jobs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/jobs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_task REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_task_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_job REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb new file mode 100644 index 000000000000..4fddfe4d3194 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/datascans_common.proto + +require 'google/protobuf' + +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\"\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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + DataScanCatalogPublishingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanCatalogPublishingStatus").msgclass + DataScanCatalogPublishingStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanCatalogPublishingStatus.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb new file mode 100644 index 000000000000..c9f845f1de96 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/datascans.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/data_discovery_pb' +require 'google/cloud/dataplex/v1/data_documentation_pb' +require 'google/cloud/dataplex/v1/data_profile_pb' +require 'google/cloud/dataplex/v1/data_quality_pb' +require 'google/cloud/dataplex/v1/processing_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/cloud/dataplex/v1/service_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/dataplex/v1/datascans.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + CreateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataScanRequest").msgclass + UpdateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataScanRequest").msgclass + DeleteDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataScanRequest").msgclass + GetDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest").msgclass + GetDataScanRequest::DataScanView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest.DataScanView").enummodule + ListDataScansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansRequest").msgclass + ListDataScansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansResponse").msgclass + RunDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanRequest").msgclass + RunDataScanResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanResponse").msgclass + GetDataScanJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest").msgclass + GetDataScanJobRequest::DataScanJobView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView").enummodule + ListDataScanJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsRequest").msgclass + ListDataScanJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsResponse").msgclass + GenerateDataQualityRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesRequest").msgclass + GenerateDataQualityRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesResponse").msgclass + DataScan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan").msgclass + DataScan::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionSpec").msgclass + DataScan::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionStatus").msgclass + DataScanJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob").msgclass + DataScanJob::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob.State").enummodule + DataScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb new file mode 100644 index 000000000000..bacd883e15ed --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/datascans.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 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/datascans_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataScanService + # DataScanService manages DataScan resources which can be configured to run + # various types of data scanning workload and generate enriched metadata (e.g. + # Data Profile, Data Quality) for the data source. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataScanService' + + # Creates a DataScan resource. + rpc :CreateDataScan, ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Google::Longrunning::Operation + # Updates a DataScan resource. + rpc :UpdateDataScan, ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Google::Longrunning::Operation + # Deletes a DataScan resource. + rpc :DeleteDataScan, ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Google::Longrunning::Operation + # Gets a DataScan resource. + rpc :GetDataScan, ::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Google::Cloud::Dataplex::V1::DataScan + # Lists DataScans. + rpc :ListDataScans, ::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Google::Cloud::Dataplex::V1::ListDataScansResponse + # Runs an on-demand execution of a DataScan + rpc :RunDataScan, ::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Google::Cloud::Dataplex::V1::RunDataScanResponse + # Gets a DataScanJob resource. + rpc :GetDataScanJob, ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Google::Cloud::Dataplex::V1::DataScanJob + # Lists DataScanJobs under the given DataScan. + rpc :ListDataScanJobs, ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse + # Generates recommended data quality rules based on the results of a data + # profiling scan. + # + # Use the recommendations to build rules for a data quality scan. + rpc :GenerateDataQualityRules, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb new file mode 100644 index 000000000000..cc016a4c438b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/logs.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/datascans_common_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n#google/cloud/dataplex/v1/logs.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + DiscoveryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent").msgclass + DiscoveryEvent::ConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails").msgclass + DiscoveryEvent::EntityDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails").msgclass + DiscoveryEvent::TableDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.TableDetails").msgclass + DiscoveryEvent::PartitionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails").msgclass + DiscoveryEvent::ActionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails").msgclass + DiscoveryEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EventType").enummodule + DiscoveryEvent::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityType").enummodule + DiscoveryEvent::TableType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.TableType").enummodule + JobEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent").msgclass + JobEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Type").enummodule + JobEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.State").enummodule + JobEvent::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Service").enummodule + JobEvent::ExecutionTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.ExecutionTrigger").enummodule + SessionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent").msgclass + SessionEvent::QueryDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail").msgclass + SessionEvent::QueryDetail::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine").enummodule + SessionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.EventType").enummodule + GovernanceEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent").msgclass + GovernanceEvent::Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity").msgclass + GovernanceEvent::Entity::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType").enummodule + GovernanceEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.EventType").enummodule + DataScanEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent").msgclass + DataScanEvent::DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileResult").msgclass + DataScanEvent::DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityResult").msgclass + DataScanEvent::DataProfileAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs").msgclass + DataScanEvent::DataQualityAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs").msgclass + DataScanEvent::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult").msgclass + DataScanEvent::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult").msgclass + DataScanEvent::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State").enummodule + DataScanEvent::ScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.ScanType").enummodule + DataScanEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.State").enummodule + DataScanEvent::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Trigger").enummodule + DataScanEvent::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Scope").enummodule + DataQualityScanRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult").msgclass + DataQualityScanRuleResult::RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType").enummodule + DataQualityScanRuleResult::EvaluationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType").enummodule + DataQualityScanRuleResult::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.Result").enummodule + BusinessGlossaryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.BusinessGlossaryEvent").msgclass + BusinessGlossaryEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.BusinessGlossaryEvent.EventType").enummodule + EntryLinkEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryLinkEvent").msgclass + EntryLinkEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryLinkEvent.EventType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb new file mode 100644 index 000000000000..489cd0102535 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/metadata.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/dataplex/v1/metadata.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e\x01\n\x13\x43reateEntityRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x35\n\x06\x65ntity\x18\x03 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13UpdateEntityRequest\x12\x35\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"^\n\x13\x44\x65leteEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xa3\x02\n\x13ListEntitiesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12K\n\x04view\x18\x02 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.ListEntitiesRequest.EntityViewB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"C\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\n\n\x06TABLES\x10\x01\x12\x0c\n\x08\x46ILESETS\x10\x02\"c\n\x14ListEntitiesResponse\x12\x32\n\x08\x65ntities\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Entity\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xde\x01\n\x10GetEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12H\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.GetEntityRequest.EntityViewB\x03\xe0\x41\x01\"J\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x08\n\x04\x46ULL\x10\x04\"\x95\x01\n\x15ListPartitionsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa9\x01\n\x16\x43reatePartitionRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12;\n\tpartition\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.PartitionB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x16\x44\x65letePartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x13\n\x04\x65tag\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x01\"j\n\x16ListPartitionsResponse\x12\x37\n\npartitions\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.Partition\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x13GetPartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\"\xc9\t\n\x06\x45ntity\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12;\n\x04type\x18\n \x01(\x0e\x32%.google.cloud.dataplex.v1.Entity.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x15\n\x05\x61sset\x18\x0b \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\tdata_path\x18\x0c \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11\x64\x61ta_path_pattern\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcatalog_entry\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12?\n\x06system\x18\x0f \x01(\x0e\x32\'.google.cloud.dataplex.v1.StorageSystemB\x06\xe0\x41\x02\xe0\x41\x05\x12<\n\x06\x66ormat\x18\x10 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageFormatB\x03\xe0\x41\x02\x12P\n\rcompatibility\x18\x13 \x01(\x0b\x32\x34.google.cloud.dataplex.v1.Entity.CompatibilityStatusB\x03\xe0\x41\x03\x12<\n\x06\x61\x63\x63\x65ss\x18\x15 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageAccessB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x06schema\x18\x32 \x01(\x0b\x32 .google.cloud.dataplex.v1.SchemaB\x03\xe0\x41\x02\x1a\x90\x02\n\x13\x43ompatibilityStatus\x12_\n\x0ehive_metastore\x18\x01 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x12Y\n\x08\x62igquery\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x1a=\n\rCompatibility\x12\x17\n\ncompatible\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x03\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02:x\xea\x41u\n\x1e\x64\x61taplex.googleapis.com/Entity\x12Sprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}\"\xa1\x02\n\tPartition\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x16\n\x06values\x18\x02 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x08location\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x13\n\x04\x65tag\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01:\x93\x01\xea\x41\x8f\x01\n!dataplex.googleapis.com/Partition\x12jprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}\"\xb7\x07\n\x06Schema\x12\x19\n\x0cuser_managed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\x02 \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x12N\n\x10partition_fields\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.Schema.PartitionFieldB\x03\xe0\x41\x01\x12M\n\x0fpartition_style\x18\x04 \x01(\x0e\x32/.google.cloud.dataplex.v1.Schema.PartitionStyleB\x03\xe0\x41\x01\x1a\xf1\x01\n\x0bSchemaField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x04type\x18\x03 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x03\xe0\x41\x02\x12\x38\n\x04mode\x18\x04 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.ModeB\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\n \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x1a`\n\x0ePartitionField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x04type\x18\x02 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x06\xe0\x41\x02\xe0\x41\x05\"\xc9\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42OOLEAN\x10\x01\x12\x08\n\x04\x42YTE\x10\x02\x12\t\n\x05INT16\x10\x03\x12\t\n\x05INT32\x10\x04\x12\t\n\x05INT64\x10\x05\x12\t\n\x05\x46LOAT\x10\x06\x12\n\n\x06\x44OUBLE\x10\x07\x12\x0b\n\x07\x44\x45\x43IMAL\x10\x08\x12\n\n\x06STRING\x10\t\x12\n\n\x06\x42INARY\x10\n\x12\r\n\tTIMESTAMP\x10\x0b\x12\x08\n\x04\x44\x41TE\x10\x0c\x12\x08\n\x04TIME\x10\r\x12\n\n\x06RECORD\x10\x0e\x12\x08\n\x04NULL\x10\x64\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REQUIRED\x10\x01\x12\x0c\n\x08NULLABLE\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\"F\n\x0ePartitionStyle\x12\x1f\n\x1bPARTITION_STYLE_UNSPECIFIED\x10\x00\x12\x13\n\x0fHIVE_COMPATIBLE\x10\x01\"\xf4\x06\n\rStorageFormat\x12\x43\n\x06\x66ormat\x18\x01 \x01(\x0e\x32..google.cloud.dataplex.v1.StorageFormat.FormatB\x03\xe0\x41\x03\x12Z\n\x12\x63ompression_format\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.StorageFormat.CompressionFormatB\x03\xe0\x41\x01\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x03\x63sv\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.StorageFormat.CsvOptionsB\x03\xe0\x41\x01H\x00\x12H\n\x04json\x18\x0b \x01(\x0b\x32\x33.google.cloud.dataplex.v1.StorageFormat.JsonOptionsB\x03\xe0\x41\x01H\x00\x12N\n\x07iceberg\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.StorageFormat.IcebergOptionsB\x03\xe0\x41\x01H\x00\x1ai\n\nCsvOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bheader_rows\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05quote\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x30\n\x0eIcebergOptions\x12\x1e\n\x11metadata_location\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07PARQUET\x10\x01\x12\x08\n\x04\x41VRO\x10\x02\x12\x07\n\x03ORC\x10\x03\x12\x07\n\x03\x43SV\x10\x64\x12\x08\n\x04JSON\x10\x65\x12\n\n\x05IMAGE\x10\xc8\x01\x12\n\n\x05\x41UDIO\x10\xc9\x01\x12\n\n\x05VIDEO\x10\xca\x01\x12\t\n\x04TEXT\x10\xcb\x01\x12\r\n\x08TFRECORD\x10\xcc\x01\x12\n\n\x05OTHER\x10\xe8\x07\x12\x0c\n\x07UNKNOWN\x10\xe9\x07\"L\n\x11\x43ompressionFormat\x12\"\n\x1e\x43OMPRESSION_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04GZIP\x10\x02\x12\t\n\x05\x42ZIP2\x10\x03\x42\t\n\x07options\"\x9a\x01\n\rStorageAccess\x12\x45\n\x04read\x18\x15 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.StorageAccess.AccessModeB\x03\xe0\x41\x03\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02*P\n\rStorageSystem\x12\x1e\n\x1aSTORAGE_SYSTEM_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_STORAGE\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\x32\x89\x0e\n\x0fMetadataService\x12\xbd\x01\n\x0c\x43reateEntity\x12-.google.cloud.dataplex.v1.CreateEntityRequest\x1a .google.cloud.dataplex.v1.Entity\"\\\xda\x41\rparent,entity\x82\xd3\xe4\x93\x02\x46\"*\x12\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a metadata entity. Only supports full resource update. + # + # @overload update_entity(request, options = nil) + # Pass arguments to `update_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_entity(entity: nil, validate_only: nil) + # Pass arguments to `update_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] + # Required. Update description. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new + # + # # Call the update_entity method. + # result = client.update_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def update_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_entity.metadata.to_h + + # Set x-goog-api-client, 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.entity&.name + header_params["entity.name"] = request.entity.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :update_entity, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata entity. + # + # @overload delete_entity(request, options = nil) + # Pass arguments to `delete_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_entity(name: nil, etag: nil) + # Pass arguments to `delete_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param etag [::String] + # Required. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new + # + # # Call the delete_entity method. + # result = client.delete_entity request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_entity.metadata.to_h + + # Set x-goog-api-client, 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_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :delete_entity, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata entity. + # + # @overload get_entity(request, options = nil) + # Pass arguments to `get_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entity(name: nil, view: nil) + # Pass arguments to `get_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] + # Optional. Used to select the subset of entity information to return. + # Defaults to `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new + # + # # Call the get_entity method. + # result = client.get_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def get_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entity.metadata.to_h + + # Set x-goog-api-client, 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_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :get_entity, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata entities in a zone. + # + # @overload list_entities(request, options = nil) + # Pass arguments to `list_entities` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] + # Required. Specify the entity view to make a partial list request. + # @param page_size [::Integer] + # Optional. Maximum number of entities to return. The service may return + # fewer than this value. If unspecified, 100 entities will be returned by + # default. The maximum value is 500; larger values will will be truncated to + # 500. + # @param page_token [::String] + # Optional. Page token received from a previous `ListEntities` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListEntities` must match the call that provided the + # page token. + # @param filter [::String] + # Optional. The following filter parameters can be added to the URL to limit + # the entities returned by the API: + # + # - Entity ID: ?filter="id=entityID" + # - Asset ID: ?filter="asset=assetID" + # - Data path ?filter="data_path=gs://my-bucket" + # - Is HIVE compatible: ?filter="hive_compatible=true" + # - Is BigQuery compatible: ?filter="bigquery_compatible=true" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new + # + # # Call the list_entities method. + # result = client.list_entities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. + # p item + # end + # + def list_entities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entities.metadata.to_h + + # Set x-goog-api-client, 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_entities.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :list_entities, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_entities, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a metadata partition. + # + # @overload create_partition(request, options = nil) + # Pass arguments to `create_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_partition(parent: nil, partition: nil, validate_only: nil) + # Pass arguments to `create_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] + # Required. Partition resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new + # + # # Call the create_partition method. + # result = client.create_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def create_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_partition.metadata.to_h + + # Set x-goog-api-client, 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_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :create_partition, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata partition. + # + # @overload delete_partition(request, options = nil) + # Pass arguments to `delete_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_partition(name: nil, etag: nil) + # Pass arguments to `delete_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the partition. + # format: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + # The \\{partition_value_path} segment consists of an ordered sequence of + # partition values separated by "/". All values must be provided. + # @param etag [::String] + # Optional. The etag associated with the partition. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new + # + # # Call the delete_partition method. + # result = client.delete_partition request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_partition.metadata.to_h + + # Set x-goog-api-client, 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_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :delete_partition, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata partition of an entity. + # + # @overload get_partition(request, options = nil) + # Pass arguments to `get_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_partition(name: nil) + # Pass arguments to `get_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the partition: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + # The \\{partition_value_path} segment consists of an ordered sequence of + # partition values separated by "/". All values must be provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new + # + # # Call the get_partition method. + # result = client.get_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def get_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_partition.metadata.to_h + + # Set x-goog-api-client, 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_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :get_partition, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata partitions of an entity. + # + # @overload list_partitions(request, options = nil) + # Pass arguments to `list_partitions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_partitions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of partitions to return. The service may return + # fewer than this value. If unspecified, 100 partitions will be returned by + # default. The maximum page size is 500; larger values will will be truncated + # to 500. + # @param page_token [::String] + # Optional. Page token received from a previous `ListPartitions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListPartitions` must match the call that provided + # the page token. + # @param filter [::String] + # Optional. Filter the partitions returned to the caller using a key value + # pair expression. Supported operators and syntax: + # + # - logic operators: AND, OR + # - comparison operators: <, >, >=, <= ,=, != + # - LIKE operators: + # - The right hand of a LIKE operator supports "." and + # "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + # - parenthetical grouping: ( ) + # + # Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + # + # **Notes:** + # + # - Keys to the left of operators are case insensitive. + # - Partition results are sorted first by creation time, then by + # lexicographic order. + # - Up to 20 key value filter pairs are allowed, but due to performance + # considerations, only the first 10 will be used as a filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new + # + # # Call the list_partitions method. + # result = client.list_partitions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. + # p item + # end + # + def list_partitions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_partitions.metadata.to_h + + # Set x-goog-api-client, 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_partitions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_partitions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.call_rpc :list_partitions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_partitions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MetadataService API. + # + # This class represents the configuration for MetadataService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::MetadataService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`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::Cloud::Dataplex::V1::MetadataService::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 MetadataService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entity + ## + # RPC-specific configuration for `update_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entity + ## + # RPC-specific configuration for `delete_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entity + ## + # RPC-specific configuration for `get_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entity + ## + # RPC-specific configuration for `list_entities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entities + ## + # RPC-specific configuration for `create_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :create_partition + ## + # RPC-specific configuration for `delete_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_partition + ## + # RPC-specific configuration for `get_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partition + ## + # RPC-specific configuration for `list_partitions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_partitions + + # @private + def initialize parent_rpcs = nil + create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity + @create_entity = ::Gapic::Config::Method.new create_entity_config + update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity + @update_entity = ::Gapic::Config::Method.new update_entity_config + delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity + @delete_entity = ::Gapic::Config::Method.new delete_entity_config + get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity + @get_entity = ::Gapic::Config::Method.new get_entity_config + list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities + @list_entities = ::Gapic::Config::Method.new list_entities_config + create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition + @create_partition = ::Gapic::Config::Method.new create_partition_config + delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition + @delete_partition = ::Gapic::Config::Method.new delete_partition_config + get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition + @get_partition = ::Gapic::Config::Method.new get_partition_config + list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions + @list_partitions = ::Gapic::Config::Method.new list_partitions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb new file mode 100644 index 000000000000..5f6f3c3f0b6b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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 "googleauth" + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + # Credentials for the MetadataService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb new file mode 100644 index 000000000000..48d9b8647b14 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# Copyright 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 + module MetadataService + # Path helper methods for the MetadataService API. + module Paths + ## + # Create a fully-qualified Entity resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param entity [String] + # + # @return [::String] + def entity_path project:, location:, lake:, zone:, entity: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" + end + + ## + # Create a fully-qualified Partition resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # @param entity [String] + # @param partition [String] + # + # @return [::String] + def partition_path project:, location:, lake:, zone:, entity:, partition: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" + raise ::ArgumentError, "entity cannot contain /" if entity.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}/partitions/#{partition}" + end + + ## + # Create a fully-qualified Zone resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` + # + # @param project [String] + # @param location [String] + # @param lake [String] + # @param zone [String] + # + # @return [::String] + def zone_path project:, location:, lake:, zone: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" + + "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb new file mode 100644 index 000000000000..1e84f7f6a1fe --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataplex/v1/version" +require "google/cloud/dataplex/v1/bindings_override" + +require "google/cloud/dataplex/v1/metadata_service/credentials" +require "google/cloud/dataplex/v1/metadata_service/paths" +require "google/cloud/dataplex/v1/metadata_service/rest/client" + +module Google + module Cloud + module Dataplex + module V1 + ## + # Metadata service manages metadata resources such as tables, filesets and + # partitions. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/dataplex/v1/metadata_service/rest" + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + module MetadataService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/dataplex/v1/metadata_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb new file mode 100644 index 000000000000..a5187f5590e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb @@ -0,0 +1,1273 @@ +# 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 "google/cloud/errors" +require "google/cloud/dataplex/v1/metadata_pb" +require "google/cloud/dataplex/v1/metadata_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + module Rest + ## + # REST client for the MetadataService service. + # + # Metadata service manages metadata resources such as tables, filesets and + # partitions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :metadata_service_stub + + ## + # Configure the MetadataService Client class. + # + # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MetadataService clients + # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Dataplex", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_entity.timeout = 60.0 + + default_config.rpcs.update_entity.timeout = 60.0 + + default_config.rpcs.delete_entity.timeout = 60.0 + + default_config.rpcs.get_entity.timeout = 60.0 + default_config.rpcs.get_entity.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_entities.timeout = 60.0 + default_config.rpcs.list_entities.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_partition.timeout = 60.0 + + default_config.rpcs.delete_partition.timeout = 60.0 + + default_config.rpcs.get_partition.timeout = 60.0 + default_config.rpcs.get_partition.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_partitions.timeout = 60.0 + default_config.rpcs.list_partitions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the MetadataService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @metadata_service_stub.universe_domain + end + + ## + # Create a new MetadataService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MetadataService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @metadata_service_stub = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @metadata_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @metadata_service_stub.endpoint + config.universe_domain = @metadata_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @metadata_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 = @metadata_service_stub.endpoint + config.universe_domain = @metadata_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @metadata_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @metadata_service_stub.logger + end + + # Service calls + + ## + # Create a metadata entity. + # + # @overload create_entity(request, options = nil) + # Pass arguments to `create_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreateEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entity(parent: nil, entity: nil, validate_only: nil) + # Pass arguments to `create_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] + # Required. Entity resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new + # + # # Call the create_entity method. + # result = client.create_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def create_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entity.metadata.to_h + + # Set x-goog-api-client, 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_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.create_entity request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a metadata entity. Only supports full resource update. + # + # @overload update_entity(request, options = nil) + # Pass arguments to `update_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_entity(entity: nil, validate_only: nil) + # Pass arguments to `update_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] + # Required. Update description. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new + # + # # Call the update_entity method. + # result = client.update_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def update_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_entity.metadata.to_h + + # Set x-goog-api-client, 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_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.update_entity request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata entity. + # + # @overload delete_entity(request, options = nil) + # Pass arguments to `delete_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_entity(name: nil, etag: nil) + # Pass arguments to `delete_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param etag [::String] + # Required. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new + # + # # Call the delete_entity method. + # result = client.delete_entity request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_entity.metadata.to_h + + # Set x-goog-api-client, 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_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.delete_entity request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata entity. + # + # @overload get_entity(request, options = nil) + # Pass arguments to `get_entity` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entity(name: nil, view: nil) + # Pass arguments to `get_entity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] + # Optional. Used to select the subset of entity information to return. + # Defaults to `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new + # + # # Call the get_entity method. + # result = client.get_entity request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + # p result + # + def get_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entity.metadata.to_h + + # Set x-goog-api-client, 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_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.get_entity request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata entities in a zone. + # + # @overload list_entities(request, options = nil) + # Pass arguments to `list_entities` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] + # Required. Specify the entity view to make a partial list request. + # @param page_size [::Integer] + # Optional. Maximum number of entities to return. The service may return + # fewer than this value. If unspecified, 100 entities will be returned by + # default. The maximum value is 500; larger values will will be truncated to + # 500. + # @param page_token [::String] + # Optional. Page token received from a previous `ListEntities` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListEntities` must match the call that provided the + # page token. + # @param filter [::String] + # Optional. The following filter parameters can be added to the URL to limit + # the entities returned by the API: + # + # - Entity ID: ?filter="id=entityID" + # - Asset ID: ?filter="asset=assetID" + # - Data path ?filter="data_path=gs://my-bucket" + # - Is HIVE compatible: ?filter="hive_compatible=true" + # - Is BigQuery compatible: ?filter="bigquery_compatible=true" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new + # + # # Call the list_entities method. + # result = client.list_entities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. + # p item + # end + # + def list_entities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entities.metadata.to_h + + # Set x-goog-api-client, 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_entities.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.list_entities request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_entities, "entities", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a metadata partition. + # + # @overload create_partition(request, options = nil) + # Pass arguments to `create_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_partition(parent: nil, partition: nil, validate_only: nil) + # Pass arguments to `create_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] + # Required. Partition resource. + # @param validate_only [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new + # + # # Call the create_partition method. + # result = client.create_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def create_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_partition.metadata.to_h + + # Set x-goog-api-client, 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_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.create_partition request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a metadata partition. + # + # @overload delete_partition(request, options = nil) + # Pass arguments to `delete_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_partition(name: nil, etag: nil) + # Pass arguments to `delete_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the partition. + # format: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + # The \\{partition_value_path} segment consists of an ordered sequence of + # partition values separated by "/". All values must be provided. + # @param etag [::String] + # Optional. The etag associated with the partition. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new + # + # # Call the delete_partition method. + # result = client.delete_partition request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_partition.metadata.to_h + + # Set x-goog-api-client, 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_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.delete_partition request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a metadata partition of an entity. + # + # @overload get_partition(request, options = nil) + # Pass arguments to `get_partition` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_partition(name: nil) + # Pass arguments to `get_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the partition: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + # The \\{partition_value_path} segment consists of an ordered sequence of + # partition values separated by "/". All values must be provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new + # + # # Call the get_partition method. + # result = client.get_partition request + # + # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + # p result + # + def get_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_partition.metadata.to_h + + # Set x-goog-api-client, 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_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.get_partition request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List metadata partitions of an entity. + # + # @overload list_partitions(request, options = nil) + # Pass arguments to `list_partitions` via a request object, either of type + # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_partitions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @param page_size [::Integer] + # Optional. Maximum number of partitions to return. The service may return + # fewer than this value. If unspecified, 100 partitions will be returned by + # default. The maximum page size is 500; larger values will will be truncated + # to 500. + # @param page_token [::String] + # Optional. Page token received from a previous `ListPartitions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListPartitions` must match the call that provided + # the page token. + # @param filter [::String] + # Optional. Filter the partitions returned to the caller using a key value + # pair expression. Supported operators and syntax: + # + # - logic operators: AND, OR + # - comparison operators: <, >, >=, <= ,=, != + # - LIKE operators: + # - The right hand of a LIKE operator supports "." and + # "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + # - parenthetical grouping: ( ) + # + # Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + # + # **Notes:** + # + # - Keys to the left of operators are case insensitive. + # - Partition results are sorted first by creation time, then by + # lexicographic order. + # - Up to 20 key value filter pairs are allowed, but due to performance + # considerations, only the first 10 will be used as a filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataplex/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new + # + # # Call the list_partitions method. + # result = client.list_partitions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. + # p item + # end + # + def list_partitions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_partitions.metadata.to_h + + # Set x-goog-api-client, 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_partitions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_partitions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @metadata_service_stub.list_partitions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_partitions, "partitions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MetadataService REST API. + # + # This class represents the configuration for MetadataService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_entity to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_entity.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # 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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + 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 MetadataService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entity + ## + # RPC-specific configuration for `update_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :update_entity + ## + # RPC-specific configuration for `delete_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_entity + ## + # RPC-specific configuration for `get_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entity + ## + # RPC-specific configuration for `list_entities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entities + ## + # RPC-specific configuration for `create_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :create_partition + ## + # RPC-specific configuration for `delete_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_partition + ## + # RPC-specific configuration for `get_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partition + ## + # RPC-specific configuration for `list_partitions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_partitions + + # @private + def initialize parent_rpcs = nil + create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity + @create_entity = ::Gapic::Config::Method.new create_entity_config + update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity + @update_entity = ::Gapic::Config::Method.new update_entity_config + delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity + @delete_entity = ::Gapic::Config::Method.new delete_entity_config + get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity + @get_entity = ::Gapic::Config::Method.new get_entity_config + list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities + @list_entities = ::Gapic::Config::Method.new list_entities_config + create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition + @create_partition = ::Gapic::Config::Method.new create_partition_config + delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition + @delete_partition = ::Gapic::Config::Method.new delete_partition_config + get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition + @get_partition = ::Gapic::Config::Method.new get_partition_config + list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions + @list_partitions = ::Gapic::Config::Method.new list_partitions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb new file mode 100644 index 000000000000..24849b77f593 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb @@ -0,0 +1,633 @@ +# 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 "google/cloud/dataplex/v1/metadata_pb" + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + module Rest + ## + # REST service stub for the MetadataService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # A result object deserialized from the server's reply + def create_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_entity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entity.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_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # A result object deserialized from the server's reply + def update_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_entity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entity.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_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_entity", + 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 get_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Entity] + # A result object deserialized from the server's reply + def get_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_entity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Entity.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_entities REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] + # A result object deserialized from the server's reply + def list_entities request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entities_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_entities", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # A result object deserialized from the server's reply + def create_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_partition", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Partition.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_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_partition", + 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 get_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::Partition] + # A result object deserialized from the server's reply + def get_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_partition", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::Partition.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_partitions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] + # A result object deserialized from the server's reply + def list_partitions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_partitions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_partitions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.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 create_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entities", + body: "entity", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{entity.name}", + body: "entity", + matches: [ + ["entity.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entity REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entities REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entities_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entities", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/partitions", + body: "partition", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_partition REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_partitions REST call + # + # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_partitions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/partitions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb new file mode 100644 index 000000000000..33b2f279f03a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/metadata.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 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/metadata_pb' + +module Google + module Cloud + module Dataplex + module V1 + module MetadataService + # Metadata service manages metadata resources such as tables, filesets and + # partitions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.MetadataService' + + # Create a metadata entity. + rpc :CreateEntity, ::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity + # Update a metadata entity. Only supports full resource update. + rpc :UpdateEntity, ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity + # Delete a metadata entity. + rpc :DeleteEntity, ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Google::Protobuf::Empty + # Get a metadata entity. + rpc :GetEntity, ::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Google::Cloud::Dataplex::V1::Entity + # List metadata entities in a zone. + rpc :ListEntities, ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Google::Cloud::Dataplex::V1::ListEntitiesResponse + # Create a metadata partition. + rpc :CreatePartition, ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Google::Cloud::Dataplex::V1::Partition + # Delete a metadata partition. + rpc :DeletePartition, ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Google::Protobuf::Empty + # Get a metadata partition of an entity. + rpc :GetPartition, ::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Google::Cloud::Dataplex::V1::Partition + # List metadata partitions of an entity. + rpc :ListPartitions, ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Google::Cloud::Dataplex::V1::ListPartitionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb new file mode 100644 index 000000000000..e770523ffff7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/processing.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n)google/cloud/dataplex/v1/processing.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger").msgclass + Trigger::OnDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.OnDemand").msgclass + Trigger::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.Schedule").msgclass + 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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb new file mode 100644 index 000000000000..374c09e4b98a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/cloud/dataplex/v1/resources.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x07\n\x04Lake\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Lake.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\t \x01(\tB\x03\xe0\x41\x03\x12@\n\tmetastore\x18\x66 \x01(\x0b\x32(.google.cloud.dataplex.v1.Lake.MetastoreB\x03\xe0\x41\x01\x12@\n\x0c\x61sset_status\x18g \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x12M\n\x10metastore_status\x18h \x01(\x0b\x32..google.cloud.dataplex.v1.Lake.MetastoreStatusB\x03\xe0\x41\x03\x1a!\n\tMetastore\x12\x14\n\x07service\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xf8\x01\n\x0fMetastoreStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Lake.MetastoreStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\"L\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:W\xea\x41T\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x34projects/{project}/locations/{location}/lakes/{lake}\"~\n\x0b\x41ssetStatus\x12/\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\ractive_assets\x18\x02 \x01(\x05\x12\'\n\x1fsecurity_policy_applying_assets\x18\x03 \x01(\x05\"\xf4\x0b\n\x04Zone\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Zone.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\t \x01(\x0e\x32#.google.cloud.dataplex.v1.Zone.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12I\n\x0e\x64iscovery_spec\x18g \x01(\x0b\x32,.google.cloud.dataplex.v1.Zone.DiscoverySpecB\x03\xe0\x41\x01\x12G\n\rresource_spec\x18h \x01(\x0b\x32+.google.cloud.dataplex.v1.Zone.ResourceSpecB\x03\xe0\x41\x02\x12@\n\x0c\x61sset_status\x18i \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0cResourceSpec\x12W\n\rlocation_type\x18\x01 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationTypeB\x06\xe0\x41\x02\xe0\x41\x05\"R\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSINGLE_REGION\x10\x01\x12\x10\n\x0cMULTI_REGION\x10\x02\x1a\xf6\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12S\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x0b\n\x07\x43URATED\x10\x02:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x41projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}\"\xab\x11\n\x06\x41\x63tion\x12;\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32).google.cloud.dataplex.v1.Action.Category\x12\r\n\x05issue\x18\x02 \x01(\t\x12/\n\x0b\x64\x65tect_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x04name\x18\x05 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Action\x12\x32\n\x04lake\x18\x06 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x32\n\x04zone\x18\x07 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x34\n\x05\x61sset\x18\x08 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\x0e\x64\x61ta_locations\x18\t \x03(\t\x12Q\n\x13invalid_data_format\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.Action.InvalidDataFormatH\x00\x12[\n\x18incompatible_data_schema\x18\x0b \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Action.IncompatibleDataSchemaH\x00\x12W\n\x16invalid_data_partition\x18\x0c \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.InvalidDataPartitionH\x00\x12\x44\n\x0cmissing_data\x18\r \x01(\x0b\x32,.google.cloud.dataplex.v1.Action.MissingDataH\x00\x12L\n\x10missing_resource\x18\x0e \x01(\x0b\x32\x30.google.cloud.dataplex.v1.Action.MissingResourceH\x00\x12V\n\x15unauthorized_resource\x18\x0f \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.UnauthorizedResourceH\x00\x12\x62\n\x1c\x66\x61iled_security_policy_apply\x18\x15 \x01(\x0b\x32:.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApplyH\x00\x12]\n\x19invalid_data_organization\x18\x16 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Action.InvalidDataOrganizationH\x00\x1a\x11\n\x0fMissingResource\x1a\x16\n\x14UnauthorizedResource\x1a*\n\x19\x46\x61iledSecurityPolicyApply\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x1a`\n\x11InvalidDataFormat\x12\x1e\n\x16sampled_data_locations\x18\x01 \x03(\t\x12\x17\n\x0f\x65xpected_format\x18\x02 \x01(\t\x12\x12\n\nnew_format\x18\x03 \x01(\t\x1a\xa0\x02\n\x16IncompatibleDataSchema\x12\r\n\x05table\x18\x01 \x01(\t\x12\x17\n\x0f\x65xisting_schema\x18\x02 \x01(\t\x12\x12\n\nnew_schema\x18\x03 \x01(\t\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x12[\n\rschema_change\x18\x05 \x01(\x0e\x32\x44.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange\"M\n\x0cSchemaChange\x12\x1d\n\x19SCHEMA_CHANGE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINCOMPATIBLE\x10\x01\x12\x0c\n\x08MODIFIED\x10\x02\x1a\xe1\x01\n\x14InvalidDataPartition\x12\x64\n\x12\x65xpected_structure\x18\x01 \x01(\x0e\x32H.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure\"c\n\x12PartitionStructure\x12#\n\x1fPARTITION_STRUCTURE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43ONSISTENT_KEYS\x10\x01\x12\x13\n\x0fHIVE_STYLE_KEYS\x10\x02\x1a\r\n\x0bMissingData\x1a\x19\n\x17InvalidDataOrganization\"f\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x17\n\x13RESOURCE_MANAGEMENT\x10\x01\x12\x13\n\x0fSECURITY_POLICY\x10\x02\x12\x12\n\x0e\x44\x41TA_DISCOVERY\x10\x03:\xa2\x02\xea\x41\x9e\x02\n\x1e\x64\x61taplex.googleapis.com/Action\x12\x45projects/{project}/locations/{location}/lakes/{lake}/actions/{action}\x12Rprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}\x12\x61projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}B\t\n\x07\x64\x65tails\"\xa4\x15\n\x05\x41sset\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x06 \x03(\x0b\x32+.google.cloud.dataplex.v1.Asset.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12H\n\rresource_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Asset.ResourceSpecB\x03\xe0\x41\x02\x12L\n\x0fresource_status\x18\x65 \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.ResourceStatusB\x03\xe0\x41\x03\x12L\n\x0fsecurity_status\x18g \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.SecurityStatusB\x03\xe0\x41\x03\x12J\n\x0e\x64iscovery_spec\x18j \x01(\x0b\x32-.google.cloud.dataplex.v1.Asset.DiscoverySpecB\x03\xe0\x41\x01\x12N\n\x10\x64iscovery_status\x18k \x01(\x0b\x32/.google.cloud.dataplex.v1.Asset.DiscoveryStatusB\x03\xe0\x41\x03\x1a\xdb\x01\n\x0eSecurityStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.SecurityStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x41PPLYING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x1a\xf8\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12R\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12T\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a\xce\x02\n\x0cResourceSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12G\n\x04type\x18\x02 \x01(\x0e\x32\x31.google.cloud.dataplex.v1.Asset.ResourceSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x10read_access_mode\x18\x05 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessModeB\x03\xe0\x41\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTORAGE_BUCKET\x10\x01\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x02\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02\x1a\xf3\x01\n\x0eResourceStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.ResourceStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12$\n\x17managed_access_identity\x18\x04 \x01(\tB\x03\xe0\x41\x03\"4\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x1a\xf4\x03\n\x0f\x44iscoveryStatus\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x05stats\x18\x06 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats\x12\x34\n\x11last_run_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x1aP\n\x05Stats\x12\x12\n\ndata_items\x18\x01 \x01(\x03\x12\x11\n\tdata_size\x18\x02 \x01(\x03\x12\x0e\n\x06tables\x18\x03 \x01(\x03\x12\x10\n\x08\x66ilesets\x18\x04 \x01(\x03\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\x0c\n\x08\x44ISABLED\x10\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1d\x64\x61taplex.googleapis.com/Asset\x12Pprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}*[\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x04\x42j\n\x1c\x63om.google.cloud.dataplex.v1B\x0eResourcesProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + Lake = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake").msgclass + Lake::Metastore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.Metastore").msgclass + Lake::MetastoreStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus").msgclass + Lake::MetastoreStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus.State").enummodule + AssetStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AssetStatus").msgclass + Zone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone").msgclass + Zone::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec").msgclass + Zone::ResourceSpec::LocationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType").enummodule + Zone::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec").msgclass + Zone::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions").msgclass + Zone::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions").msgclass + Zone::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.Type").enummodule + Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action").msgclass + Action::MissingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingResource").msgclass + Action::UnauthorizedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.UnauthorizedResource").msgclass + Action::FailedSecurityPolicyApply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply").msgclass + Action::InvalidDataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataFormat").msgclass + Action::IncompatibleDataSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema").msgclass + Action::IncompatibleDataSchema::SchemaChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange").enummodule + Action::InvalidDataPartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition").msgclass + Action::InvalidDataPartition::PartitionStructure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure").enummodule + Action::MissingData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingData").msgclass + Action::InvalidDataOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataOrganization").msgclass + Action::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.Category").enummodule + Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset").msgclass + Asset::SecurityStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus").msgclass + Asset::SecurityStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus.State").enummodule + Asset::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec").msgclass + Asset::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions").msgclass + Asset::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions").msgclass + Asset::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec").msgclass + Asset::ResourceSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.Type").enummodule + Asset::ResourceSpec::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode").enummodule + Asset::ResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus").msgclass + Asset::ResourceStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus.State").enummodule + Asset::DiscoveryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus").msgclass + Asset::DiscoveryStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats").msgclass + Asset::DiscoveryStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.State").enummodule + State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb new file mode 100644 index 000000000000..a9a9feb5cf01 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb @@ -0,0 +1,45 @@ +# 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 "google/cloud/dataplex/v1/dataplex_service/rest" +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/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" +require "google/cloud/dataplex/v1/bindings_override" +require "google/cloud/dataplex/v1/version" + +module Google + module Cloud + module Dataplex + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/dataplex/v1/rest" + # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb new file mode 100644 index 000000000000..09bb0b83ffd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/security.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\'google/cloud/dataplex/v1/security.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"U\n\x12ResourceAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07writers\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06owners\x18\x03 \x03(\tB\x03\xe0\x41\x01\"&\n\x0e\x44\x61taAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x42i\n\x1c\x63om.google.cloud.dataplex.v1B\rSecurityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + ResourceAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ResourceAccessSpec").msgclass + DataAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAccessSpec").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb new file mode 100644 index 000000000000..89e84dcb80b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/cloud/dataplex/v1/tasks_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/dataplex/v1/service.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/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 +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + CreateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateLakeRequest").msgclass + UpdateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateLakeRequest").msgclass + DeleteLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteLakeRequest").msgclass + ListLakesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesRequest").msgclass + ListLakesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesResponse").msgclass + ListLakeActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakeActionsRequest").msgclass + ListActionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListActionsResponse").msgclass + GetLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetLakeRequest").msgclass + CreateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateZoneRequest").msgclass + UpdateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateZoneRequest").msgclass + DeleteZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteZoneRequest").msgclass + ListZonesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesRequest").msgclass + ListZonesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesResponse").msgclass + ListZoneActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZoneActionsRequest").msgclass + GetZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetZoneRequest").msgclass + CreateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAssetRequest").msgclass + UpdateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAssetRequest").msgclass + DeleteAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAssetRequest").msgclass + ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsRequest").msgclass + ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsResponse").msgclass + ListAssetActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetActionsRequest").msgclass + GetAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAssetRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.OperationMetadata").msgclass + CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateTaskRequest").msgclass + UpdateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateTaskRequest").msgclass + DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteTaskRequest").msgclass + ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksRequest").msgclass + ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksResponse").msgclass + GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetTaskRequest").msgclass + GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetJobRequest").msgclass + RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskRequest").msgclass + RunTaskResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskResponse").msgclass + ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsRequest").msgclass + ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsResponse").msgclass + CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CancelJobRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb new file mode 100644 index 000000000000..d3e7f876d98b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb @@ -0,0 +1,104 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/dataplex/v1/service.proto for package 'google.cloud.dataplex.v1' +# Original file comments: +# Copyright 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/service_pb' + +module Google + module Cloud + module Dataplex + module V1 + module DataplexService + # Dataplex service provides data lakes as a service. The primary resources + # offered by this service are Lakes, Zones and Assets which collectively allow + # a data administrator to organize, manage, secure and catalog data across + # their organization located across cloud projects in a variety of storage + # systems including Cloud Storage and BigQuery. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.dataplex.v1.DataplexService' + + # Creates a lake resource. + rpc :CreateLake, ::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Google::Longrunning::Operation + # Updates a lake resource. + rpc :UpdateLake, ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Google::Longrunning::Operation + # Deletes a lake resource. All zones within the lake must be deleted before + # the lake can be deleted. + rpc :DeleteLake, ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Google::Longrunning::Operation + # Lists lake resources in a project and location. + rpc :ListLakes, ::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Google::Cloud::Dataplex::V1::ListLakesResponse + # Retrieves a lake resource. + rpc :GetLake, ::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Google::Cloud::Dataplex::V1::Lake + # Lists action resources in a lake. + rpc :ListLakeActions, ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse + # Creates a zone resource within a lake. + rpc :CreateZone, ::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Google::Longrunning::Operation + # Updates a zone resource. + rpc :UpdateZone, ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Google::Longrunning::Operation + # Deletes a zone resource. All assets within a zone must be deleted before + # the zone can be deleted. + rpc :DeleteZone, ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Google::Longrunning::Operation + # Lists zone resources in a lake. + rpc :ListZones, ::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Google::Cloud::Dataplex::V1::ListZonesResponse + # Retrieves a zone resource. + rpc :GetZone, ::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Google::Cloud::Dataplex::V1::Zone + # Lists action resources in a zone. + rpc :ListZoneActions, ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse + # Creates an asset resource. + rpc :CreateAsset, ::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Google::Longrunning::Operation + # Updates an asset resource. + rpc :UpdateAsset, ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Google::Longrunning::Operation + # Deletes an asset resource. The referenced storage resource is detached + # (default) or deleted based on the associated Lifecycle policy. + rpc :DeleteAsset, ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Google::Longrunning::Operation + # Lists asset resources in a zone. + rpc :ListAssets, ::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Google::Cloud::Dataplex::V1::ListAssetsResponse + # Retrieves an asset resource. + rpc :GetAsset, ::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Google::Cloud::Dataplex::V1::Asset + # Lists action resources in an asset. + rpc :ListAssetActions, ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse + # Creates a task resource within a lake. + rpc :CreateTask, ::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Google::Longrunning::Operation + # Update the task resource. + rpc :UpdateTask, ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Google::Longrunning::Operation + # Delete the task resource. + rpc :DeleteTask, ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Google::Longrunning::Operation + # Lists tasks under the given lake. + rpc :ListTasks, ::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Google::Cloud::Dataplex::V1::ListTasksResponse + # Get task resource. + rpc :GetTask, ::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Google::Cloud::Dataplex::V1::Task + # Lists Jobs under the given task. + rpc :ListJobs, ::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Google::Cloud::Dataplex::V1::ListJobsResponse + # Run an on demand execution of a Task. + rpc :RunTask, ::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Google::Cloud::Dataplex::V1::RunTaskResponse + # Get job resource. + rpc :GetJob, ::Google::Cloud::Dataplex::V1::GetJobRequest, ::Google::Cloud::Dataplex::V1::Job + # Cancel jobs running for the task resource. + rpc :CancelJob, ::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb new file mode 100644 index 000000000000..1530fc4bfcbe --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/dataplex/v1/tasks.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/dataplex/v1/resources_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n$google/cloud/dataplex/v1/tasks.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x16\n\x04Task\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x07 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32*.google.cloud.dataplex.v1.Task.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x0ctrigger_spec\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Task.TriggerSpecB\x03\xe0\x41\x02\x12I\n\x0e\x65xecution_spec\x18\x65 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x02\x12N\n\x10\x65xecution_status\x18\xc9\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.ExecutionStatusB\x03\xe0\x41\x03\x12@\n\x05spark\x18\xac\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.SparkTaskConfigH\x00\x12\x46\n\x08notebook\x18\xae\x02 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.NotebookTaskConfigH\x00\x1a\x9a\x06\n\x12InfrastructureSpec\x12X\n\x05\x62\x61tch\x18\x34 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResourcesH\x00\x12\x62\n\x0f\x63ontainer_image\x18\x65 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntimeH\x01\x12T\n\x0bvpc_network\x18\x96\x01 \x01(\x0b\x32<.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetworkH\x02\x1aW\n\x15\x42\x61tchComputeResources\x12\x1c\n\x0f\x65xecutors_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13max_executors_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x86\x02\n\x15\x43ontainerImageRuntime\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tjava_jars\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\nVpcNetwork\x12\x16\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1a\n\x0bsub_network\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\x0cnetwork_tags\x18\x03 \x03(\tB\x03\xe0\x41\x01\x42\x0e\n\x0cnetwork_nameB\x0b\n\tresourcesB\t\n\x07runtimeB\t\n\x07network\x1a\x9a\x02\n\x0bTriggerSpec\x12\x45\n\x04type\x18\x05 \x01(\x0e\x32/.google.cloud.dataplex.v1.Task.TriggerSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_retries\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\x64 \x01(\tB\x03\xe0\x41\x01H\x00\":\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tRECURRING\x10\x02\x42\t\n\x07trigger\x1a\x95\x02\n\rExecutionSpec\x12I\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x36.google.cloud.dataplex.v1.Task.ExecutionSpec.ArgsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07project\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x1amax_job_execution_lifetime\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\t \x01(\tB\x03\xe0\x41\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa5\x02\n\x0fSparkTaskConfig\x12\x1b\n\x11main_jar_file_uri\x18\x64 \x01(\tH\x00\x12\x14\n\nmain_class\x18\x65 \x01(\tH\x00\x12\x1c\n\x12python_script_file\x18\x66 \x01(\tH\x00\x12\x19\n\x0fsql_script_file\x18h \x01(\tH\x00\x12\x14\n\nsql_script\x18i \x01(\tH\x00\x12\x16\n\tfile_uris\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12S\n\x13infrastructure_spec\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x42\x08\n\x06\x64river\x1a\xb3\x01\n\x12NotebookTaskConfig\x12\x15\n\x08notebook\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\x13infrastructure_spec\x18\x03 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x12\x16\n\tfile_uris\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a\x7f\n\x0f\x45xecutionStatus\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\nlatest_job\x18\t \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.JobB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x41projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}B\x08\n\x06\x63onfig\"\xc5\x07\n\x03Job\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x03\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32#.google.cloud.dataplex.v1.Job.StateB\x03\xe0\x41\x03\x12\x18\n\x0bretry_count\x18\x06 \x01(\rB\x03\xe0\x41\x03\x12;\n\x07service\x18\x07 \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.ServiceB\x03\xe0\x41\x03\x12\x18\n\x0bservice_job\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\t \x01(\tB\x03\xe0\x41\x03\x12>\n\x06labels\x18\n \x03(\x0b\x32).google.cloud.dataplex.v1.Job.LabelsEntryB\x03\xe0\x41\x03\x12;\n\x07trigger\x18\x0b \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.TriggerB\x03\xe0\x41\x03\x12I\n\x0e\x65xecution_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"r\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nCANCELLING\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0b\n\x07\x41\x42ORTED\x10\x06\"D\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02:n\xea\x41k\n\x1b\x64\x61taplex.googleapis.com/Job\x12Lprojects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}Bf\n\x1c\x63om.google.cloud.dataplex.v1B\nTasksProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Dataplex + module V1 + Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task").msgclass + Task::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec").msgclass + Task::InfrastructureSpec::BatchComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources").msgclass + Task::InfrastructureSpec::ContainerImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime").msgclass + Task::InfrastructureSpec::VpcNetwork = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork").msgclass + Task::TriggerSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec").msgclass + Task::TriggerSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec.Type").enummodule + Task::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionSpec").msgclass + Task::SparkTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.SparkTaskConfig").msgclass + Task::NotebookTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.NotebookTaskConfig").msgclass + Task::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionStatus").msgclass + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job").msgclass + Job::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Service").enummodule + Job::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.State").enummodule + Job::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Trigger").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb new file mode 100644 index 000000000000..499baaa7dd0a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 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 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md new file mode 100644 index 000000000000..b4aad34dcd67 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Dataplex V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# 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 Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # 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 + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 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 + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + 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 + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 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 Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# 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 Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 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 Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# 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 Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb new file mode 100644 index 000000000000..6f78bce27124 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb @@ -0,0 +1,294 @@ +# 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 + # Environment represents a user-visible compute infrastructure for analytics + # within a lake. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the environment, of the form: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id} + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the environment. This + # ID will be different if the environment is deleted and re-created with the + # same name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Environment creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the environment was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the environment. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the environment. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the environment. + # @!attribute [rw] infrastructure_spec + # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec] + # Required. Infrastructure specification for the Environment. + # @!attribute [rw] session_spec + # @return [::Google::Cloud::Dataplex::V1::Environment::SessionSpec] + # Optional. Configuration for sessions created for this environment. + # @!attribute [r] session_status + # @return [::Google::Cloud::Dataplex::V1::Environment::SessionStatus] + # Output only. Status of sessions created for this environment. + # @!attribute [r] endpoints + # @return [::Google::Cloud::Dataplex::V1::Environment::Endpoints] + # Output only. URI Endpoints to access sessions associated with the + # Environment. + class Environment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the underlying infrastructure used to run workloads. + # @!attribute [rw] compute + # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::ComputeResources] + # Optional. Compute resources needed for analyze interactive workloads. + # @!attribute [rw] os_image + # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::OsImageRuntime] + # Required. Software Runtime Configuration for analyze interactive + # workloads. + class InfrastructureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Compute resources associated with the analyze interactive workloads. + # @!attribute [rw] disk_size_gb + # @return [::Integer] + # Optional. Size in GB of the disk. Default is 100 GB. + # @!attribute [rw] node_count + # @return [::Integer] + # Optional. Total number of nodes in the sessions created for this + # environment. + # @!attribute [rw] max_node_count + # @return [::Integer] + # Optional. Max configurable nodes. + # If max_node_count > node_count, then auto-scaling is enabled. + class ComputeResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Software Runtime Configuration to run Analyze. + # @!attribute [rw] image_version + # @return [::String] + # Required. Dataplex Universal Catalog Image version. + # @!attribute [rw] java_libraries + # @return [::Array<::String>] + # Optional. List of Java jars to be included in the runtime environment. + # Valid input includes Cloud Storage URIs to Jar binaries. + # For example, gs://bucket-name/my/path/to/file.jar + # @!attribute [rw] python_packages + # @return [::Array<::String>] + # Optional. A list of python packages to be installed. + # Valid formats include Cloud Storage URI to a PIP installable library. + # For example, gs://bucket-name/my/path/to/lib.tar.gz + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Spark properties to provide configuration for use in sessions + # created for this environment. The properties to set on daemon config + # files. Property keys are specified in `prefix:property` format. The + # prefix must be "spark". + class OsImageRuntime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Configuration for sessions created for this environment. + # @!attribute [rw] max_idle_duration + # @return [::Google::Protobuf::Duration] + # Optional. The idle time configuration of the session. The session will be + # auto-terminated at the end of this period. + # @!attribute [rw] enable_fast_startup + # @return [::Boolean] + # Optional. If True, this causes sessions to be pre-created and available + # for faster startup to enable interactive exploration use-cases. This + # defaults to False to avoid additional billed charges. These can only be + # set to True for the environment with name set to "default", and with + # default configuration. + class SessionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of sessions created for this environment. + # @!attribute [r] active + # @return [::Boolean] + # Output only. Queries over sessions to mark whether the environment is + # currently active or not + class SessionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # URI Endpoints to access sessions associated with the Environment. + # @!attribute [r] notebooks + # @return [::String] + # Output only. URI to serve notebook APIs + # @!attribute [r] sql + # @return [::String] + # Output only. URI to serve SQL APIs + class Endpoints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Content represents a user-visible notebook or a sql script + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the content, of the form: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the content. This ID + # will be different if the content is deleted and re-created with the same + # name. + # @!attribute [rw] path + # @return [::String] + # Required. The path for the Content file, represented as directory + # structure. Unique within a lake. Limited to alphanumerics, hyphens, + # underscores, dots and slashes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Content creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the content was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the content. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the content. + # @!attribute [rw] data_text + # @return [::String] + # Required. Content data in string format. + # @!attribute [rw] sql_script + # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript] + # Sql Script related configurations. + # + # Note: The following fields are mutually exclusive: `sql_script`, `notebook`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] notebook + # @return [::Google::Cloud::Dataplex::V1::Content::Notebook] + # Notebook related configurations. + # + # Note: The following fields are mutually exclusive: `notebook`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Content + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the Sql Script content. + # @!attribute [rw] engine + # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript::QueryEngine] + # Required. Query Engine to be used for the Sql Query. + class SqlScript + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Query Engine Type of the SQL Script. + module QueryEngine + # Value was unspecified. + QUERY_ENGINE_UNSPECIFIED = 0 + + # Spark SQL Query. + SPARK = 2 + end + end + + # Configuration for Notebook content. + # @!attribute [rw] kernel_type + # @return [::Google::Cloud::Dataplex::V1::Content::Notebook::KernelType] + # Required. Kernel Type of the notebook. + class Notebook + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Kernel Type of the Jupyter notebook. + module KernelType + # Kernel Type unspecified. + KERNEL_TYPE_UNSPECIFIED = 0 + + # Python 3 Kernel. + PYTHON3 = 1 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents an active analyze session running for a user. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the content, of the form: + # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id}/sessions/\\{session_id} + # @!attribute [r] user_id + # @return [::String] + # Output only. Email of user running the session. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Session start time. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. State of Session + class Session + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/business_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/business_glossary.rb new file mode 100644 index 000000000000..60118f7baed5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/business_glossary.rb @@ -0,0 +1,531 @@ +# 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 Glossary represents a collection of GlossaryCategories and GlossaryTerms + # defined by the user. Glossary is a top level resource and is the Google Cloud + # parent resource of all the GlossaryCategories and GlossaryTerms within it. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the Glossary. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # @!attribute [r] uid + # @return [::String] + # Output only. System generated unique id for the Glossary. This ID will be + # different if the Glossary is deleted and re-created with the + # same name. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name of the Glossary. This is user-mutable. + # This will be same as the GlossaryId, if not specified. + # @!attribute [rw] description + # @return [::String] + # Optional. The user-mutable description of the Glossary. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the Glossary was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the Glossary was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the Glossary. + # @!attribute [r] term_count + # @return [::Integer] + # Output only. The number of GlossaryTerms in the Glossary. + # @!attribute [r] category_count + # @return [::Integer] + # Output only. The number of GlossaryCategories in the Glossary. + # @!attribute [rw] etag + # @return [::String] + # Optional. Needed for resource freshness validation. + # 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. + class Glossary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A GlossaryCategory represents a collection of GlossaryCategories and + # GlossaryTerms within a Glossary that are related to each other. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the GlossaryCategory. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + # @!attribute [r] uid + # @return [::String] + # Output only. System generated unique id for the GlossaryCategory. This ID + # will be different if the GlossaryCategory is deleted and re-created with + # the same name. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name of the GlossaryCategory. This is + # user-mutable. This will be same as the GlossaryCategoryId, if not + # specified. + # @!attribute [rw] description + # @return [::String] + # Optional. The user-mutable description of the GlossaryCategory. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the GlossaryCategory was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the GlossaryCategory was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the GlossaryCategory. + # @!attribute [rw] parent + # @return [::String] + # Required. The immediate parent of the GlossaryCategory in the + # resource-hierarchy. It can either be a Glossary or a GlossaryCategory. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # OR + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + class GlossaryCategory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # GlossaryTerms are the core of Glossary. + # A GlossaryTerm holds a rich text description that can be attached to Entries + # or specific columns to enrich them. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the GlossaryTerm. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + # @!attribute [r] uid + # @return [::String] + # Output only. System generated unique id for the GlossaryTerm. This ID will + # be different if the GlossaryTerm is deleted and re-created with the same + # name. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name of the GlossaryTerm. This is + # user-mutable. This will be same as the GlossaryTermId, if not specified. + # @!attribute [rw] description + # @return [::String] + # Optional. The user-mutable description of the GlossaryTerm. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the GlossaryTerm was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the GlossaryTerm was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the GlossaryTerm. + # @!attribute [rw] parent + # @return [::String] + # Required. The immediate parent of the GlossaryTerm in the + # resource-hierarchy. It can either be a Glossary or a GlossaryCategory. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # OR + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + class GlossaryTerm + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Create Glossary Request + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this Glossary will be created. + # Format: projects/\\{project_id_or_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] glossary_id + # @return [::String] + # Required. Glossary ID: Glossary identifier. + # @!attribute [rw] glossary + # @return [::Google::Cloud::Dataplex::V1::Glossary] + # Required. The Glossary to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Validates the request without actually creating the Glossary. + # Default: false. + class CreateGlossaryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update Glossary Request + # @!attribute [rw] glossary + # @return [::Google::Cloud::Dataplex::V1::Glossary] + # Required. The Glossary to update. + # The Glossary's `name` field is used to identify the Glossary to update. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Validates the request without actually updating the Glossary. + # Default: false. + class UpdateGlossaryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete Glossary Request + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Glossary to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag of the Glossary. + # 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. + class DeleteGlossaryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get Glossary Request + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Glossary to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + class GetGlossaryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List Glossaries Request + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which has this collection of Glossaries. + # Format: projects/\\{project_id_or_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of Glossaries to return. The service may + # return fewer than this value. If unspecified, at most 50 Glossaries 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 `ListGlossaries` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListGlossaries` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression that filters Glossaries listed in the response. + # Filters on proto fields of Glossary are supported. + # Examples of using a filter are: + # - `display_name="my-glossary"` + # - `categoryCount=1` + # - `termCount=0` + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by expression that orders Glossaries listed in the + # response. Order by fields are: `name` or `create_time` for the result. If + # not specified, the ordering is undefined. + class ListGlossariesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List Glossaries Response + # @!attribute [rw] glossaries + # @return [::Array<::Google::Cloud::Dataplex::V1::Glossary>] + # Lists the Glossaries in the specified parent. + # @!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 omitted, there are no subsequent pages. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that the service couldn't reach. + class ListGlossariesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Creates a new GlossaryCategory under the specified Glossary. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this GlossaryCategory will be created. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # where `locationId` refers to a Google Cloud region. + # @!attribute [rw] category_id + # @return [::String] + # Required. GlossaryCategory identifier. + # @!attribute [rw] category + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # Required. The GlossaryCategory to create. + class CreateGlossaryCategoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update GlossaryCategory Request + # @!attribute [rw] category + # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] + # Required. The GlossaryCategory to update. + # The GlossaryCategory's `name` field is used to identify the + # GlossaryCategory to update. Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + class UpdateGlossaryCategoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete GlossaryCategory Request + # @!attribute [rw] name + # @return [::String] + # Required. The name of the GlossaryCategory to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + class DeleteGlossaryCategoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get GlossaryCategory Request + # @!attribute [rw] name + # @return [::String] + # Required. The name of the GlossaryCategory to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} + class GetGlossaryCategoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List GlossaryCategories Request + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which has this collection of GlossaryCategories. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # Location is the Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of GlossaryCategories to return. The service + # may return fewer than this value. If unspecified, at most 50 + # GlossaryCategories 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 `ListGlossaryCategories` + # call. Provide this to retrieve the subsequent page. When paginating, all + # other parameters provided to `ListGlossaryCategories` must match the call + # that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression that filters GlossaryCategories listed in the + # response. Filters are supported on the following fields: + # - immediate_parent + # + # Examples of using a filter are: + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` + # + # This will only return the GlossaryCategories that are directly nested + # under the specified parent. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by expression that orders GlossaryCategories listed in the + # response. Order by fields are: `name` or `create_time` for the result. If + # not specified, the ordering is undefined. + class ListGlossaryCategoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List GlossaryCategories Response + # @!attribute [rw] categories + # @return [::Array<::Google::Cloud::Dataplex::V1::GlossaryCategory>] + # Lists the GlossaryCategories in the specified parent. + # @!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 omitted, there are no subsequent pages. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that the service couldn't reach. + class ListGlossaryCategoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Creates a new GlossaryTerm under the specified Glossary. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where the GlossaryTerm will be created. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] term_id + # @return [::String] + # Required. GlossaryTerm identifier. + # @!attribute [rw] term + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # Required. The GlossaryTerm to create. + class CreateGlossaryTermRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update GlossaryTerm Request + # @!attribute [rw] term + # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] + # Required. The GlossaryTerm to update. + # The GlossaryTerm's `name` field is used to identify the GlossaryTerm to + # update. Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + class UpdateGlossaryTermRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete GlossaryTerm Request + # @!attribute [rw] name + # @return [::String] + # Required. The name of the GlossaryTerm to delete. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + class DeleteGlossaryTermRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get GlossaryTerm Request + # @!attribute [rw] name + # @return [::String] + # Required. The name of the GlossaryTerm to retrieve. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} + class GetGlossaryTermRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List GlossaryTerms Request + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which has this collection of GlossaryTerms. + # Format: + # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of GlossaryTerms to return. The service may + # return fewer than this value. If unspecified, at most 50 GlossaryTerms 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 `ListGlossaryTerms` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListGlossaryTerms` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression that filters GlossaryTerms listed in the + # response. Filters are supported on the following fields: + # - immediate_parent + # + # Examples of using a filter are: + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` + # - + # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` + # + # This will only return the GlossaryTerms that are directly nested under the + # specified parent. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by expression that orders GlossaryTerms listed in the + # response. Order by fields are: `name` or `create_time` for the result. If + # not specified, the ordering is undefined. + class ListGlossaryTermsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List GlossaryTerms Response + # @!attribute [rw] terms + # @return [::Array<::Google::Cloud::Dataplex::V1::GlossaryTerm>] + # Lists the GlossaryTerms in the specified parent. + # @!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 omitted, there are no subsequent pages. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that the service couldn't reach. + class ListGlossaryTermsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb new file mode 100644 index 000000000000..3a0db77929dd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb @@ -0,0 +1,2253 @@ +# 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 + # AspectType is a template for creating Aspects, and represents the + # JSON-schema for a given Entry, for example, BigQuery Table Schema. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id}/aspectTypes/\\{aspect_type_id}. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the AspectType. + # If you delete and recreate the AspectType with the same name, then this ID + # will be different. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the AspectType was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the AspectType was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the AspectType. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the AspectType. + # @!attribute [rw] etag + # @return [::String] + # The service computes this checksum. The client may send it on update and + # delete requests to ensure it has an up-to-date value before proceeding. + # @!attribute [rw] data_classification + # @return [::Google::Cloud::Dataplex::V1::AspectType::DataClassification] + # Optional. Immutable. Stores data classification of the aspect. + # @!attribute [rw] authorization + # @return [::Google::Cloud::Dataplex::V1::AspectType::Authorization] + # Immutable. Defines the Authorization for this type. + # @!attribute [rw] metadata_template + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] + # Required. MetadataTemplate of the aspect. + # @!attribute [r] transfer_status + # @return [::Google::Cloud::Dataplex::V1::TransferStatus] + # Output only. Denotes the transfer status of the Aspect Type. It is + # unspecified for Aspect Types created from Dataplex API. + class AspectType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Authorization for an AspectType. + # @!attribute [rw] alternate_use_permission + # @return [::String] + # Immutable. The IAM permission grantable on the EntryGroup to allow access + # to instantiate Aspects of Dataplex Universal Catalog owned AspectTypes, + # only settable for Dataplex Universal Catalog owned Types. + class Authorization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MetadataTemplate definition for an AspectType. + # @!attribute [rw] index + # @return [::Integer] + # Optional. Index is used to encode Template messages. The value of index + # can range between 1 and 2,147,483,647. Index must be unique within all + # fields in a Template. (Nested Templates can reuse indexes). Once a + # Template is defined, the index cannot be changed, because it identifies + # the field in the actual storage format. Index is a mandatory field, but + # it is optional for top level fields, and map/array "values" definitions. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the field. + # @!attribute [rw] type + # @return [::String] + # Required. The datatype of this field. The following values are supported: + # + # Primitive types: + # + # * string + # * int + # * bool + # * double + # * datetime. Must be of the format RFC3339 UTC "Zulu" (Examples: + # "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). + # + # Complex types: + # + # * enum + # * array + # * map + # * record + # @!attribute [rw] record_fields + # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate>] + # Optional. Field definition. You must specify it if the type is record. It + # defines the nested fields. + # @!attribute [rw] enum_values + # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::EnumValue>] + # Optional. The list of values for an enum type. You must define it if the + # type is enum. + # @!attribute [rw] map_items + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] + # Optional. If the type is map, set map_items. map_items can refer to a + # primitive field or a complex (record only) field. To specify a primitive + # field, you only need to set name and type in the nested + # MetadataTemplate. The recommended value for the name field is item, as + # this isn't used in the actual payload. + # @!attribute [rw] array_items + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] + # Optional. If the type is array, set array_items. array_items can refer + # to a primitive field or a complex (record only) field. To specify a + # primitive field, you only need to set name and type in the nested + # MetadataTemplate. The recommended value for the name field is item, as + # this isn't used in the actual payload. + # @!attribute [rw] type_id + # @return [::String] + # Optional. You can use type id if this definition of the field needs to be + # reused later. The type id must be unique across the entire template. You + # can only specify it if the field type is record. + # @!attribute [rw] type_ref + # @return [::String] + # Optional. A reference to another field definition (not an inline + # definition). The value must be equal to the value of an id field defined + # elsewhere in the MetadataTemplate. Only fields with record type can + # refer to other fields. + # @!attribute [rw] constraints + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Constraints] + # Optional. Specifies the constraints on this field. + # @!attribute [rw] annotations + # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Annotations] + # Optional. Specifies annotations on this field. + class MetadataTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Definition of Enumvalue, to be used for enum fields. + # @!attribute [rw] index + # @return [::Integer] + # Required. Index for the enum value. It can't be modified. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the enumvalue. This is the actual value that the + # aspect can contain. + # @!attribute [rw] deprecated + # @return [::String] + # Optional. You can set this message if you need to deprecate an enum + # value. + class EnumValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Definition of the constraints of a field. + # @!attribute [rw] required + # @return [::Boolean] + # Optional. Marks this field as optional or required. + class Constraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Definition of the annotations of a field. + # @!attribute [rw] deprecated + # @return [::String] + # Optional. Marks a field as deprecated. You can include a deprecation + # message. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Display name for a field. + # @!attribute [rw] description + # @return [::String] + # Optional. Description for a field. + # @!attribute [rw] display_order + # @return [::Integer] + # Optional. Display order for a field. You can use this to reorder where + # a field is rendered. + # @!attribute [rw] string_type + # @return [::String] + # Optional. You can use String Type annotations to specify special + # meaning to string fields. The following values are supported: + # + # * richText: The field must be interpreted as a rich text field. + # * url: A fully qualified URL link. + # * resource: A service qualified resource reference. + # @!attribute [rw] string_values + # @return [::Array<::String>] + # Optional. Suggested hints for string fields. You can use them to + # suggest values to users through console. + class Annotations + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Classifies the data stored by the aspect. + module DataClassification + # Denotes that the aspect contains only metadata. + DATA_CLASSIFICATION_UNSPECIFIED = 0 + + # Metadata and data classification. + METADATA_AND_DATA = 1 + end + end + + # An Entry Group represents a logical grouping of one or more Entries. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the EntryGroup, in the format + # projects/\\{project_id_or_number}/locations/\\{location_id}/entryGroups/\\{entry_group_id}. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the EntryGroup. If you + # delete and recreate the EntryGroup with the same name, this ID will be + # different. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryGroup was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryGroup was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the EntryGroup. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the EntryGroup. + # @!attribute [rw] etag + # @return [::String] + # This checksum is computed by the service, and might be sent on update and + # delete requests to ensure the client has an up-to-date value before + # proceeding. + # @!attribute [r] transfer_status + # @return [::Google::Cloud::Dataplex::V1::TransferStatus] + # Output only. Denotes the transfer status of the Entry Group. It is + # unspecified for Entry Group created from Dataplex API. + class EntryGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Entry Type is a template for creating Entries. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id}/entryTypes/\\{entry_type_id}. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the EntryType. This ID + # will be different if the EntryType is deleted and re-created with the same + # name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryType was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the EntryType was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the EntryType. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the EntryType. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the service, and might be sent on + # update and delete requests to ensure the client has an up-to-date value + # before proceeding. + # @!attribute [rw] type_aliases + # @return [::Array<::String>] + # Optional. Indicates the classes this Entry Type belongs to, for example, + # TABLE, DATABASE, MODEL. + # @!attribute [rw] platform + # @return [::String] + # Optional. The platform that Entries of this type belongs to. + # @!attribute [rw] system + # @return [::String] + # Optional. The system that Entries of this type belongs to. Examples include + # CloudSQL, MariaDB etc + # @!attribute [rw] required_aspects + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType::AspectInfo>] + # AspectInfo for the entry type. + # @!attribute [rw] authorization + # @return [::Google::Cloud::Dataplex::V1::EntryType::Authorization] + # Immutable. Authorization defined for this type. + class EntryType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] type + # @return [::String] + # Required aspect type for the entry type. + class AspectInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Authorization for an Entry Type. + # @!attribute [rw] alternate_use_permission + # @return [::String] + # Immutable. The IAM permission grantable on the Entry Group to allow + # access to instantiate Entries of Dataplex Universal Catalog owned Entry + # Types, only settable for Dataplex Universal Catalog owned Types. + class Authorization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An aspect is a single piece of metadata describing an entry. + # @!attribute [r] aspect_type + # @return [::String] + # Output only. The resource name of the type used to create this Aspect. + # @!attribute [r] path + # @return [::String] + # Output only. The path in the entry under which the aspect is attached. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Aspect was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Aspect was last updated. + # @!attribute [rw] data + # @return [::Google::Protobuf::Struct] + # Required. The content of the aspect, according to its aspect type schema. + # The maximum size of the field is 120KB (encoded as UTF-8). + # @!attribute [rw] aspect_source + # @return [::Google::Cloud::Dataplex::V1::AspectSource] + # Optional. Information related to the source system of the aspect. + class Aspect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information related to the source system of the aspect. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the aspect was created in the source system. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time the aspect was last updated in the source system. + # @!attribute [rw] data_version + # @return [::String] + # The version of the data format used to produce this data. This field is + # used to indicated when the underlying data format changes (e.g., schema + # modifications, changes to the source URL format definition, etc). + class AspectSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An entry is a representation of a data resource that can be described by + # various metadata. + # @!attribute [rw] name + # @return [::String] + # Identifier. The relative resource name of the entry, in the format + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. + # @!attribute [rw] entry_type + # @return [::String] + # Required. Immutable. The relative resource name of the entry type that was + # used to create this entry, in the format + # `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the entry was created in Dataplex Universal + # Catalog. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the entry was last updated in Dataplex Universal + # Catalog. + # @!attribute [rw] aspects + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::Aspect}] + # Optional. The aspects that are attached to the entry. Depending on how the + # aspect is attached to the entry, the format of the aspect key can be one of + # the following: + # + # * If the aspect is attached directly to the entry: + # `{project_id_or_number}.{location_id}.{aspect_type_id}` + # * If the aspect is attached to an entry's path: + # `{project_id_or_number}.{location_id}.{aspect_type_id}@{path}` + # @!attribute [rw] parent_entry + # @return [::String] + # Optional. Immutable. The resource name of the parent entry, in the format + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. + # @!attribute [rw] fully_qualified_name + # @return [::String] + # Optional. A name for the entry that can be referenced by an external + # system. For more information, see [Fully qualified + # names](https://cloud.google.com/data-catalog/docs/fully-qualified-names). + # The maximum size of the field is 4000 characters. + # @!attribute [rw] entry_source + # @return [::Google::Cloud::Dataplex::V1::EntrySource] + # Optional. Information related to the source system of the data resource + # that is represented by the entry. + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Dataplex::V1::Aspect] + class AspectsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Information related to the source system of the data resource that is + # represented by the entry. + # @!attribute [rw] resource + # @return [::String] + # The name of the resource in the source system. + # Maximum length is 4,000 characters. + # @!attribute [rw] system + # @return [::String] + # The name of the source system. + # Maximum length is 64 characters. + # @!attribute [rw] platform + # @return [::String] + # The platform containing the source system. + # Maximum length is 64 characters. + # @!attribute [rw] display_name + # @return [::String] + # A user-friendly display name. + # Maximum length is 500 characters. + # @!attribute [rw] description + # @return [::String] + # A description of the data resource. + # Maximum length is 2,000 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-defined labels. + # The maximum size of keys and values is 128 characters each. + # @!attribute [rw] ancestors + # @return [::Array<::Google::Cloud::Dataplex::V1::EntrySource::Ancestor>] + # Immutable. The entries representing the ancestors of the data resource in + # the source system. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the resource was created in the source system. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the resource was last updated in the source system. If the + # entry exists in the system and its `EntrySource` has `update_time` + # populated, further updates to the `EntrySource` of the entry must provide + # incremental updates to its `update_time`. + # @!attribute [r] location + # @return [::String] + # Output only. Location of the resource in the source system. You can search + # the entry by this location. By default, this should match the location of + # the entry group containing this entry. A different value allows capturing + # the source location for data external to Google Cloud. + class EntrySource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about individual items in the hierarchy that is associated with + # the data resource. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of the ancestor resource. + # @!attribute [rw] type + # @return [::String] + # Optional. The type of the ancestor resource. + class Ancestor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Create EntryGroup Request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the entryGroup, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] entry_group_id + # @return [::String] + # Required. EntryGroup identifier. + # @!attribute [rw] entry_group + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # Required. EntryGroup Resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. The service validates the request without performing any + # mutations. The default is false. + class CreateEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update EntryGroup Request. + # @!attribute [rw] entry_group + # @return [::Google::Cloud::Dataplex::V1::EntryGroup] + # Required. EntryGroup Resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. The service validates the request, without performing any + # mutations. The default is false. + class UpdateEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete EntryGroup Request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryGroupRequest method returns an ABORTED error + # response. + class DeleteEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List entryGroups request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the entryGroup location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of EntryGroups to return. The service may return + # fewer than this value. If unspecified, the service returns at most 10 + # EntryGroups. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListEntryGroups` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters you provide to `ListEntryGroups` must match the call that + # provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListEntryGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List entry groups response. + # @!attribute [rw] entry_groups + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryGroup>] + # Entry groups under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that the service couldn't reach. + class ListEntryGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get EntryGroup request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryGroup: + # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + class GetEntryGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create EntryType Request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the EntryType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] entry_type_id + # @return [::String] + # Required. EntryType identifier. + # @!attribute [rw] entry_type + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # Required. EntryType Resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. The service validates the request without performing any + # mutations. The default is false. + class CreateEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update EntryType Request. + # @!attribute [rw] entry_type + # @return [::Google::Cloud::Dataplex::V1::EntryType] + # Required. EntryType Resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. The service validates the request without performing any + # mutations. The default is false. + class UpdateEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete EntryType Request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteEntryTypeRequest method returns an ABORTED error response. + class DeleteEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List EntryTypes request + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the EntryType location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of EntryTypes to return. The service may return + # fewer than this value. If unspecified, the service returns at most 10 + # EntryTypes. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListEntryTypes` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters you provided to `ListEntryTypes` must match the call that + # provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. Filters are case-sensitive. + # The service supports the following formats: + # + # * labels.key1 = "value1" + # * labels:key1 + # * name = "value" + # + # These restrictions can be conjoined with AND, OR, and NOT conjunctions. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Orders the result by `name` or `create_time` fields. + # If not specified, the ordering is undefined. + class ListEntryTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List EntryTypes response. + # @!attribute [rw] entry_types + # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType>] + # EntryTypes under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that the service couldn't reach. + class ListEntryTypesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get EntryType request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EntryType: + # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. + class GetEntryTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create AspectType Request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AspectType, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] aspect_type_id + # @return [::String] + # Required. AspectType identifier. + # @!attribute [rw] aspect_type + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # Required. AspectType Resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. The service validates the request without performing any + # mutations. The default is false. + class CreateAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update AspectType Request + # @!attribute [rw] aspect_type + # @return [::Google::Cloud::Dataplex::V1::AspectType] + # Required. AspectType Resource + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete AspectType Request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteAspectTypeRequest method returns an ABORTED error + # response. + class DeleteAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List AspectTypes request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the AspectType location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of AspectTypes to return. The service may return + # fewer than this value. If unspecified, the service returns at most 10 + # AspectTypes. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListAspectTypes` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters you provide to `ListAspectTypes` 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" + # + # These restrictions can be conjoined with AND, OR, and NOT conjunctions. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Orders the result by `name` or `create_time` fields. + # If not specified, the ordering is undefined. + class ListAspectTypesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List AspectTypes response. + # @!attribute [rw] aspect_types + # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType>] + # AspectTypes under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that the service couldn't reach. + class ListAspectTypesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get AspectType request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the AspectType: + # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + class GetAspectTypeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create Entry request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @!attribute [rw] entry_id + # @return [::String] + # Required. Entry identifier. It has to be unique within an Entry Group. + # + # Entries corresponding to Google Cloud resources use an Entry ID format + # based on [full resource + # names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + # The format is a full resource name of the resource without the + # prefix double slashes in the API service name part of the full resource + # name. This allows retrieval of entries using their associated resource + # name. + # + # For example, if the full resource name of a resource is + # `//library.googleapis.com/shelves/shelf1/books/book2`, + # then the suggested entry_id is + # `library.googleapis.com/shelves/shelf1/books/book2`. + # + # It is also suggested to follow the same convention for entries + # corresponding to resources from providers or systems other than Google + # Cloud. + # + # The maximum size of the field is 4000 characters. + # @!attribute [rw] entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Required. Entry resource. + class CreateEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update Entry request. + # @!attribute [rw] entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Required. Entry resource. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Mask of fields to update. To update Aspects, the update_mask must + # contain the value "aspects". + # + # If the update_mask is empty, the service will update all modifiable fields + # present in the request. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true and the entry doesn't exist, the service will + # create it. + # @!attribute [rw] delete_missing_aspects + # @return [::Boolean] + # Optional. If set to true and the aspect_keys specify aspect ranges, the + # service deletes any existing aspects from that range that weren't provided + # in the request. + # @!attribute [rw] aspect_keys + # @return [::Array<::String>] + # Optional. The map keys of the Aspects which the service should modify. It + # supports the following syntaxes: + # + # * `` - matches an aspect of the given type and empty + # path. + # * `@path` - matches an aspect of the given type and + # specified path. For example, to attach an aspect to a field that is + # specified by the `schema` aspect, the path should have the format + # `Schema.`. + # * `@*` - matches aspects of the given type for all + # paths. + # * `*@path` - matches aspects of all types on the given path. + # + # The service will not remove existing aspects matching the syntax unless + # `delete_missing_aspects` is set to true. + # + # If this field is left empty, the service treats it as specifying + # exactly those Aspects present in the request. + class UpdateEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete Entry request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + class DeleteEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List Entries request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of items to return per page. If there are remaining + # results, the service returns a next_page_token. If unspecified, the service + # returns at most 10 Entries. The maximum value is 100; values above 100 will + # be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListEntries` call. Provide + # this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter on the entries to return. Filters are case-sensitive. + # You can filter the request by the following fields: + # + # * entry_type + # * entry_source.display_name + # * parent_entry + # + # The comparison operators are =, !=, <, >, <=, >=. The service compares + # strings according to lexical order. + # + # You can use the logical operators AND, OR, NOT in the filter. + # + # You can use Wildcard "*", but for entry_type and parent_entry you need to + # provide the full project id or number. + # + # You cannot use parent_entry in conjunction with other fields. + # + # Example filter expressions: + # + # * "entry_source.display_name=AnExampleDisplayName" + # * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" + # * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + # entry_type=projects/another-project/locations/*" + # * "NOT entry_source.display_name=AnotherExampleDisplayName" + # * "parent_entry=projects/example-project/locations/us/entryGroups/example-entry-group/entries/example-entry" + class ListEntriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List Entries response. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Dataplex::V1::Entry>] + # The list of entries under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListEntriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get Entry request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View to control which parts of an entry the service should + # return. + # @!attribute [rw] aspect_types + # @return [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # It only works for CUSTOM view. + # @!attribute [rw] paths + # @return [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. It only works for CUSTOM view. + class GetEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Lookup Entry request 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] view + # @return [::Google::Cloud::Dataplex::V1::EntryView] + # Optional. View to control which parts of an entry the service should + # return. + # @!attribute [rw] aspect_types + # @return [::Array<::String>] + # Optional. Limits the aspects returned to the provided aspect types. + # It only works for CUSTOM view. + # @!attribute [rw] paths + # @return [::Array<::String>] + # Optional. Limits the aspects returned to those associated with the provided + # paths within the Entry. It only works for CUSTOM view. + # @!attribute [rw] entry + # @return [::String] + # Required. The resource name of the Entry: + # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. + class LookupEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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 + # following form: `projects/{project}/locations/global`. + # @!attribute [rw] query + # @return [::String] + # Required. The query against which entries in scope should be matched. + # The query syntax is defined in [Search syntax for Dataplex Universal + # Catalog](https://cloud.google.com/dataplex/docs/search-syntax). + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of results in the search page. If <=0, then defaults + # to 10. Max limit for page_size is 1000. Throws an invalid argument for + # page_size > 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `SearchEntries` call. Provide + # this to retrieve the subsequent page. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specifies the ordering of results. + # Supported values are: + # + # * `relevance` + # * `last_modified_timestamp` + # * `last_modified_timestamp asc` + # @!attribute [rw] scope + # @return [::String] + # Optional. The scope under which the search should be operating. It must + # either be `organizations/` or `projects/`. If it is + # unspecified, it defaults to the organization where the project provided in + # `name` is located. + # @!attribute [rw] semantic_search + # @return [::Boolean] + # Optional. Specifies whether the search should understand the meaning and + # intent behind the query, rather than just matching keywords. + class SearchEntriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single result of a SearchEntries request. + # @!attribute [rw] linked_resource + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Linked resource name. + # @!attribute [rw] dataplex_entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # @!attribute [rw] snippets + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResult::Snippets] + # Snippets. + class SearchEntriesResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Snippets for the entry, contains HTML-style highlighting for + # matched tokens, will be used in UI. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] dataplex_entry + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Entry + class Snippets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] + # The results matching the search query. + # @!attribute [rw] total_size + # @return [::Integer] + # The estimated total number of matching entries. This number isn't + # guaranteed to be accurate. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that the service couldn't reach. Search results don't include + # data from these locations. + class SearchEntriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An object that describes the values that you want to set for an entry and its + # attached aspects when you import metadata. Used when you run a metadata + # import job. See + # {::Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_job CreateMetadataJob}. + # + # You provide a collection of import items in a metadata import file. For more + # information about how to create a metadata import file, see [Metadata import + # file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). + # @!attribute [rw] entry + # @return [::Google::Cloud::Dataplex::V1::Entry] + # Information about an entry and its attached aspects. + # @!attribute [rw] entry_link + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # Information about the entry link. User should provide either one of the + # entry or entry_link. While providing entry_link, user should not + # provide update_mask and aspect_keys. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The fields to update, in paths that are relative to the `Entry` resource. + # Separate each field with a comma. + # + # In `FULL` entry sync mode, Dataplex Universal Catalog includes the paths of + # all of the fields for an entry that can be modified, including aspects. + # This means that Dataplex Universal Catalog replaces the existing entry with + # the entry in the metadata import file. All modifiable fields are updated, + # regardless of the fields that are listed in the update mask, and regardless + # of whether a field is present in the `entry` object. + # + # The `update_mask` field is ignored when an entry is created or re-created. + # + # In an aspect-only metadata job (when entry sync mode is `NONE`), set this + # value to `aspects`. + # + # + # Dataplex Universal Catalog also determines which entries and aspects to + # modify by comparing the values and timestamps that you provide in the + # metadata import file with the values and timestamps that exist in your + # project. For more information, see [Comparison + # logic](https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic). + # @!attribute [rw] aspect_keys + # @return [::Array<::String>] + # The aspects to modify. Supports the following syntaxes: + # + # * `{aspect_type_reference}`: matches aspects that belong to the specified + # aspect type and are attached directly to the entry. + # * `{aspect_type_reference}@{path}`: matches aspects that belong to the + # specified aspect type and path. + # * `{aspect_type_reference}@*` : matches aspects of the given type for all + # paths. + # * `*@path` : matches aspects of all types on the given path. + # + # Replace `{aspect_type_reference}` with a reference to the aspect type, in + # the format + # `{project_id_or_number}.{location_id}.{aspect_type_id}`. + # + # In `FULL` entry sync mode, if you leave this field empty, it is treated as + # specifying exactly those aspects that are present within the specified + # entry. Dataplex Universal Catalog implicitly adds the keys for all of the + # required aspects of an entry. + class ImportItem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create metadata job request. + # @!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_job + # @return [::Google::Cloud::Dataplex::V1::MetadataJob] + # Required. The metadata job resource. + # @!attribute [rw] metadata_job_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 CreateMetadataJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get metadata job request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the metadata job, in the format + # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. + class GetMetadataJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List metadata jobs request. + # @!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 jobs to return. The service might + # return fewer jobs than this value. If unspecified, at most 10 jobs are + # returned. The maximum value is 1,000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token received from a previous `ListMetadataJobs` call. + # Provide this token to retrieve the subsequent page of results. When + # paginating, all other parameters that are provided to the + # `ListMetadataJobs` request must match the call that provided the page + # token. + # @!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 ListMetadataJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List metadata jobs response. + # @!attribute [rw] metadata_jobs + # @return [::Array<::Google::Cloud::Dataplex::V1::MetadataJob>] + # Metadata jobs 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_locations + # @return [::Array<::String>] + # Locations that the service couldn't reach. + class ListMetadataJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cancel metadata job request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the job, in the format + # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` + class CancelMetadataJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A metadata job resource. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the resource that the configuration is + # applied to, in the format + # `projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. + # @!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 [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the metadata job was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the metadata job was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::Type] + # Required. Metadata job type. + # @!attribute [rw] import_spec + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec] + # Import job specification. + # + # Note: The following fields are mutually exclusive: `import_spec`, `export_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] export_spec + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ExportJobSpec] + # Export job specification. + # + # Note: The following fields are mutually exclusive: `export_spec`, `import_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] import_result + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobResult] + # Output only. Import job result. + # + # Note: The following fields are mutually exclusive: `import_result`, `export_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] export_result + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ExportJobResult] + # Output only. Export job result. + # + # Note: The following fields are mutually exclusive: `export_result`, `import_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] status + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::Status] + # Output only. Metadata job status. + class MetadataJob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Results from a metadata import job. + # @!attribute [r] deleted_entries + # @return [::Integer] + # Output only. The total number of entries that were deleted. + # @!attribute [r] updated_entries + # @return [::Integer] + # Output only. The total number of entries that were updated. + # @!attribute [r] created_entries + # @return [::Integer] + # Output only. The total number of entries that were created. + # @!attribute [r] unchanged_entries + # @return [::Integer] + # Output only. The total number of entries that were unchanged. + # @!attribute [r] recreated_entries + # @return [::Integer] + # Output only. The total number of entries that were recreated. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the status was updated. + # @!attribute [r] deleted_entry_links + # @return [::Integer] + # Output only. The total number of entry links that were successfully + # deleted. + # @!attribute [r] created_entry_links + # @return [::Integer] + # Output only. The total number of entry links that were successfully + # created. + # @!attribute [r] unchanged_entry_links + # @return [::Integer] + # Output only. The total number of entry links that were left unchanged. + class ImportJobResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Summary results from a metadata export job. The results are a snapshot of + # the metadata at the time when the job was created. The exported entries are + # saved to a Cloud Storage bucket. + # @!attribute [r] exported_entries + # @return [::Integer] + # Output only. The number of entries that were exported. + # @!attribute [r] error_message + # @return [::String] + # Output only. The error message if the metadata export job failed. + class ExportJobResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Job specification for a metadata import job. + # + # You can run the following kinds of metadata import jobs: + # + # * Full sync of entries with incremental import of their aspects. + # Supported for custom entries. + # * Incremental import of aspects only. Supported for aspects that belong + # to custom entries and system entries. For custom entries, you can modify + # both optional aspects and required aspects. For system entries, you can + # modify optional aspects. + # @!attribute [rw] source_storage_uri + # @return [::String] + # Optional. The URI of a Cloud Storage bucket or folder (beginning with + # `gs://` and ending with `/`) that contains the metadata import files for + # this job. + # + # A metadata import file defines the values to set for each of the entries + # and aspects in a metadata import job. For more information about how to + # create a metadata import file and the file requirements, see [Metadata + # import + # file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). + # + # You can provide multiple metadata import files in the same metadata job. + # The bucket or folder must contain at least one metadata import file, in + # JSON Lines format (either `.json` or `.jsonl` file extension). + # + # In `FULL` entry sync mode, don't save the metadata import file in a + # folder named `SOURCE_STORAGE_URI/deletions/`. + # + # **Caution**: If the metadata import file contains no data, all entries + # and aspects that belong to the job's scope are deleted. + # @!attribute [rw] source_create_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time when the process that created the metadata import + # files began. + # @!attribute [rw] scope + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec::ImportJobScope] + # Required. A boundary on the scope of impact that the metadata import job + # can have. + # @!attribute [rw] entry_sync_mode + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec::SyncMode] + # Required. The sync mode for entries. + # @!attribute [rw] aspect_sync_mode + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec::SyncMode] + # Required. The sync mode for aspects. + # @!attribute [rw] log_level + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec::LogLevel] + # Optional. The level of logs to write to Cloud Logging for this job. + # + # Debug-level logs provide highly-detailed information for + # troubleshooting, but their increased verbosity could incur [additional + # costs](https://cloud.google.com/stackdriver/pricing) that might not be + # merited for all jobs. + # + # If unspecified, defaults to `INFO`. + class ImportJobSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A boundary on the scope of impact that the metadata import job can have. + # @!attribute [rw] entry_groups + # @return [::Array<::String>] + # Required. The entry groups that are in scope for the import job, + # specified as relative resource names in the format + # `projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}`. + # Only entries and aspects that belong to the specified entry groups are + # affected by the job. + # + # The entry groups and the job must be in the same location. + # @!attribute [rw] entry_types + # @return [::Array<::String>] + # Required. The entry types that are in scope for the import job, + # specified as relative resource names in the format + # `projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}`. + # The job modifies only the entries and aspects that belong to these + # entry types. + # + # If the metadata import file attempts to modify an entry whose type + # isn't included in this list, the import job is halted before modifying + # any entries or aspects. + # + # The location of an entry type must either match the location of the + # job, or the entry type must be global. + # @!attribute [rw] aspect_types + # @return [::Array<::String>] + # Optional. The aspect types that are in scope for the import job, + # specified as relative resource names in the format + # `projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}`. + # The job modifies only the aspects that belong to these aspect types. + # + # This field is required when creating an aspect-only import job. + # + # If the metadata import file attempts to modify an aspect whose type + # isn't included in this list, the import job is halted before modifying + # any entries or aspects. + # + # The location of an aspect type must either match the location of the + # job, or the aspect type must be global. + # @!attribute [rw] glossaries + # @return [::Array<::String>] + # Optional. The glossaries that are in scope for the import job, + # specified as relative resource names in the format + # `projects/{project_number_or_id}/locations/{location_id}/glossaries/{glossary_id}`. + # + # While importing Business Glossary entries, the user must + # provide glossaries. While importing entries, the user does not have to + # provide glossaries. If the metadata import file attempts to modify + # Business Glossary entries whose glossary isn't included in this list, + # the import job will skip those entries. + # + # The location of a glossary must either match the location of the + # job, or the glossary must be global. + # @!attribute [rw] entry_link_types + # @return [::Array<::String>] + # Optional. The entry link types that are in scope for the import job, + # specified as relative resource names in the format + # `projects/{project_number_or_id}/locations/{location_id}/entryLinkTypes/{entry_link_type_id}`. + # The job modifies only the entryLinks that belong to these entry link + # types. + # + # If the metadata import file attempts to create or delete an entry link + # whose entry link type isn't included in this list, the import job will + # skip those entry links. + # @!attribute [rw] referenced_entry_scopes + # @return [::Array<::String>] + # Optional. Defines the scope of entries that can be referenced in the + # entry links. + # + # Currently, projects are supported as valid scopes. + # Format: `projects/{project_number_or_id}` + # + # If the metadata import file attempts to create an entry link + # which references an entry that is not in the scope, the import job will + # skip that entry link. + class ImportJobScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies how the entries and aspects in a metadata import job are + # updated. For more information, see [Sync + # mode](https://cloud.google.com/dataplex/docs/import-metadata#sync-mode). + module SyncMode + # Sync mode unspecified. + SYNC_MODE_UNSPECIFIED = 0 + + # All resources in the job's scope are modified. If a resource exists in + # Dataplex Universal Catalog but isn't included in the metadata import + # file, the resource is deleted when you run the metadata job. Use this + # mode to perform a full sync of the set of entries in the job scope. + # + # This sync mode is supported for entries. + FULL = 1 + + # Only the resources that are explicitly included in the + # metadata import file are modified. Use this mode to modify a subset of + # resources while leaving unreferenced resources unchanged. + # + # This sync mode is supported for aspects. + INCREMENTAL = 2 + + # If entry sync mode is `NONE`, then aspects are modified according + # to the aspect sync mode. Other metadata that belongs to entries in the + # job's scope isn't modified. + # + # This sync mode is supported for entries. + NONE = 3 + end + + # The level of logs to write to Cloud Logging for this job. + module LogLevel + # Log level unspecified. + LOG_LEVEL_UNSPECIFIED = 0 + + # Debug-level logging. Captures detailed logs for each import item. Use + # debug-level logging to troubleshoot issues with specific import items. + # For example, use debug-level logging to identify resources that are + # missing from the job scope, entries or aspects that don't conform to + # the associated entry type or aspect type, or other misconfigurations + # with the metadata import file. + # + # Depending on the size of your metadata job and the number of logs that + # are generated, debug-level logging might incur + # [additional costs](https://cloud.google.com/stackdriver/pricing). + DEBUG = 1 + + # Info-level logging. Captures logs at the overall job level. Includes + # aggregate logs about import items, but doesn't specify which import + # item has an error. + INFO = 2 + end + end + + # Job specification for a metadata export job. + # @!attribute [rw] scope + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ExportJobSpec::ExportJobScope] + # Required. The scope of the export job. + # @!attribute [rw] output_path + # @return [::String] + # Required. The root path of the Cloud Storage bucket to export the + # metadata to, in the format `gs://{bucket}/`. You can optionally specify a + # custom prefix after the bucket name, in the format + # `gs://{bucket}/{prefix}/`. The maximum length of the custom prefix is 128 + # characters. Dataplex Universal Catalog constructs the object path for the + # exported files by using the bucket name and prefix that you provide, + # followed by a system-generated path. + # + # The bucket must be in the same VPC Service Controls perimeter as the job. + class ExportJobSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The scope of the export job. + # @!attribute [rw] organization_level + # @return [::Boolean] + # Whether the metadata export job is an organization-level export job. + # + # - If `true`, the job exports the entries from the same organization and + # VPC Service Controls perimeter as the job. The project that the job + # belongs to determines the VPC Service Controls perimeter. If you set + # the job scope to be at the organization level, then don't provide a + # list of projects or entry groups. + # - If `false`, you must specify a list of projects or a list of entry + # groups whose entries you want to export. + # + # The default is `false`. + # @!attribute [rw] projects + # @return [::Array<::String>] + # The projects whose metadata you want to export, in the format + # `projects/{project_id_or_number}`. Only the entries from + # the specified projects are exported. + # + # The projects must be in the same organization and VPC Service Controls + # perimeter as the job. + # + # If you set the job scope to be a list of projects, then set the + # organization-level export flag to false and don't provide a list of + # entry groups. + # @!attribute [rw] entry_groups + # @return [::Array<::String>] + # The entry groups whose metadata you want to export, in the format + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # Only the entries in the specified entry groups are exported. + # + # The entry groups must be in the same location and the same VPC Service + # Controls perimeter as the job. + # + # If you set the job scope to be a list of entry groups, then set the + # organization-level export flag to false and don't provide a list of + # projects. + # @!attribute [rw] entry_types + # @return [::Array<::String>] + # The entry types that are in scope for the export job, 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 affected by + # the job. + # @!attribute [rw] aspect_types + # @return [::Array<::String>] + # The aspect types that are in scope for the export job, specified as + # relative resource names in the format + # `projects/{project_id_or_number}/locations/{location}/aspectTypes/{aspect_type_id}`. + # Only aspects that belong to the specified aspect types are affected by + # the job. + class ExportJobScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Metadata job status. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::MetadataJob::Status::State] + # Output only. State of the metadata job. + # @!attribute [r] message + # @return [::String] + # Output only. Message relating to the progression of a metadata job. + # @!attribute [r] completion_percent + # @return [::Integer] + # Output only. Progress tracking. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the status was updated. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of a metadata job. + module State + # State unspecified. + STATE_UNSPECIFIED = 0 + + # The job is queued. + QUEUED = 1 + + # The job is running. + RUNNING = 2 + + # The job is being canceled. + CANCELING = 3 + + # The job is canceled. + CANCELED = 4 + + # The job succeeded. + SUCCEEDED = 5 + + # The job failed. + FAILED = 6 + + # The job completed with some errors. + SUCCEEDED_WITH_ERRORS = 7 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata job type. + module Type + # Unspecified. + TYPE_UNSPECIFIED = 0 + + # Import job. + IMPORT = 1 + + # Export job. + EXPORT = 2 + end + end + + # EntryLink represents a link between two Entries. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. Identifier. The relative resource name of the Entry + # Link, of the form: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}` + # @!attribute [rw] entry_link_type + # @return [::String] + # Required. Immutable. Relative resource name of the Entry Link Type used to + # create this Entry Link. For example: + # + # - Entry link between synonym terms in a glossary: + # `projects/dataplex-types/locations/global/entryLinkTypes/synonym` + # - Entry link between related terms in a glossary: + # `projects/dataplex-types/locations/global/entryLinkTypes/related` + # - Entry link between glossary terms and data assets: + # `projects/dataplex-types/locations/global/entryLinkTypes/definition` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Entry Link was created. + # @!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. 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 + + # Reference to the Entry that is linked through the Entry Link. + # @!attribute [rw] name + # @return [::String] + # Required. Immutable. The relative resource name of the referenced Entry, + # of the form: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` + # @!attribute [rw] path + # @return [::String] + # Immutable. The path in the Entry that is referenced in the Entry Link. + # Empty path denotes that the Entry itself is referenced in the Entry + # Link. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::EntryLink::EntryReference::Type] + # Required. Immutable. The reference type of the Entry. + class EntryReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reference type of the Entry. + module Type + # Unspecified reference type. Implies that the Entry is referenced + # in a non-directional Entry Link. + UNSPECIFIED = 0 + + # The Entry is referenced as the source of the directional Entry Link. + SOURCE = 2 + + # The Entry is referenced as the target of the directional Entry Link. + 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. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent Entry Group: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`. + # @!attribute [rw] entry_link_id + # @return [::String] + # Required. Entry Link 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 EntryGroup. + # @!attribute [rw] entry_link + # @return [::Google::Cloud::Dataplex::V1::EntryLink] + # Required. Entry Link resource. + class CreateEntryLinkRequest + include ::Google::Protobuf::MessageExts + 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] + # Required. The resource name of the Entry Link: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + class DeleteEntryLinkRequest + include ::Google::Protobuf::MessageExts + 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] + # Required. The resource name of the Entry Link: + # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. + class GetEntryLinkRequest + include ::Google::Protobuf::MessageExts + 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. + ENTRY_VIEW_UNSPECIFIED = 0 + + # Returns entry only, without aspects. + BASIC = 1 + + # Returns all required aspects as well as the keys of all non-required + # aspects. + FULL = 2 + + # Returns aspects matching custom fields in GetEntryRequest. If the number of + # aspects exceeds 100, the first 100 will be returned. + CUSTOM = 3 + + # Returns all aspects. If the number of aspects exceeds 100, the first + # 100 will be returned. + ALL = 4 + end + + # Denotes the transfer status of a resource. It is unspecified for resources + # created from Dataplex API. + module TransferStatus + # The default value. It is set for resources that were not subject for + # migration from Data Catalog service. + TRANSFER_STATUS_UNSPECIFIED = 0 + + # Indicates that a resource was migrated from Data Catalog service but it + # hasn't been transferred yet. In particular the resource cannot be updated + # from Dataplex API. + TRANSFER_STATUS_MIGRATED = 1 + + # Indicates that a resource was transferred from Data Catalog service. The + # resource can only be updated from Dataplex API. + TRANSFER_STATUS_TRANSFERRED = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/cmek.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/cmek.rb new file mode 100644 index 000000000000..0118c1948ccb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/cmek.rb @@ -0,0 +1,216 @@ +# 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 Resource designed to manage encryption configurations for customers to + # support Customer Managed Encryption Keys (CMEK). + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the EncryptionConfig. + # Format: + # organizations/\\{organization}/locations/\\{location}/encryptionConfigs/\\{encryption_config} + # Global location is not supported. + # @!attribute [rw] key + # @return [::String] + # Optional. If a key is chosen, it means that the customer is using CMEK. + # If a key is not chosen, it means that the customer is using Google managed + # encryption. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Encryption configuration was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the Encryption configuration was last updated. + # @!attribute [r] encryption_state + # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig::EncryptionState] + # Output only. The state of encryption of the databases. + # @!attribute [rw] etag + # @return [::String] + # Etag of the EncryptionConfig. This is a strong etag. + # @!attribute [r] failure_details + # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig::FailureDetails] + # Output only. Details of the failure if anything related to Cmek db fails. + # @!attribute [rw] enable_metastore_encryption + # @return [::Boolean] + # Optional. Represent the state of CMEK opt-in for metastore. + class EncryptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details of the failure if anything related to Cmek db fails. + # @!attribute [r] error_code + # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig::FailureDetails::ErrorCode] + # Output only. The error code for the failure. + # @!attribute [r] error_message + # @return [::String] + # Output only. The error message will be shown to the user. Set only if the + # error code is REQUIRE_USER_ACTION. + class FailureDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Error code for the failure if anything related to Cmek db fails. + module ErrorCode + # The error code is not specified + UNKNOWN = 0 + + # Error because of internal server error, will be retried automatically. + INTERNAL_ERROR = 1 + + # User action is required to resolve the error. + REQUIRE_USER_ACTION = 2 + end + end + + # State of encryption of the databases when EncryptionConfig is created or + # updated. + module EncryptionState + # State is not specified. + ENCRYPTION_STATE_UNSPECIFIED = 0 + + # The encryption state of the database when the EncryptionConfig is created + # or updated. If the encryption fails, it is retried indefinitely and the + # state is shown as ENCRYPTING. + ENCRYPTING = 1 + + # The encryption of data has completed successfully. + COMPLETED = 2 + + # The encryption of data has failed. + # The state is set to FAILED when the encryption fails due to reasons like + # permission issues, invalid key etc. + FAILED = 3 + end + end + + # Create EncryptionConfig Request + # @!attribute [rw] parent + # @return [::String] + # Required. The location at which the EncryptionConfig is to be created. + # @!attribute [rw] encryption_config_id + # @return [::String] + # Required. The ID of the + # {::Google::Cloud::Dataplex::V1::EncryptionConfig EncryptionConfig} to create. + # Currently, only a value of "default" is supported. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] + # Required. The EncryptionConfig to create. + class CreateEncryptionConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get EncryptionConfig Request + # @!attribute [rw] name + # @return [::String] + # Required. The name of the EncryptionConfig to fetch. + class GetEncryptionConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update EncryptionConfig Request + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] + # Required. The EncryptionConfig to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Mask of fields to update. + # The service treats an omitted field mask as an implied field mask + # equivalent to all fields that are populated (have a non-empty value). + class UpdateEncryptionConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete EncryptionConfig Request + # @!attribute [rw] name + # @return [::String] + # Required. The name of the EncryptionConfig to delete. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag of the EncryptionConfig. This is a strong etag. + class DeleteEncryptionConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List EncryptionConfigs Request + # @!attribute [rw] parent + # @return [::String] + # Required. The location for which the EncryptionConfig is to be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of EncryptionConfigs to return. The service may + # return fewer than this value. If unspecified, at most 10 EncryptionConfigs + # 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 `ListEncryptionConfigs` call. + # Provide this to retrieve the subsequent page. When paginating, the + # parameters - filter and order_by provided to `ListEncryptionConfigs` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter the EncryptionConfigs to be returned. + # Using bare literals: (These values will be matched anywhere it may appear + # in the object's field values) + # * filter=some_value + # Using fields: (These values will be matched only in the specified field) + # * filter=some_field=some_value + # Supported fields: + # * name, key, create_time, update_time, encryption_state + # Example: + # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config + # conjunctions: (AND, OR, NOT) + # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config + # AND mode=CMEK + # logical operators: (>, <, >=, <=, !=, =, :), + # * filter=create_time>2024-05-01T00:00:00.000Z + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListEncryptionConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List EncryptionConfigs Response + # @!attribute [rw] encryption_configs + # @return [::Array<::Google::Cloud::Dataplex::V1::EncryptionConfig>] + # The list of EncryptionConfigs under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListEncryptionConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_discovery.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_discovery.rb new file mode 100644 index 000000000000..9bc271dacaf3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_discovery.rb @@ -0,0 +1,222 @@ +# 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 + # Spec for a data discovery scan. + # @!attribute [rw] bigquery_publishing_config + # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::BigQueryPublishingConfig] + # Optional. Configuration for metadata publishing. + # @!attribute [rw] storage_config + # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::StorageConfig] + # Cloud Storage related configurations. + class DataDiscoverySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes BigQuery publishing configurations. + # @!attribute [rw] table_type + # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::BigQueryPublishingConfig::TableType] + # Optional. Determines whether to publish discovered tables as BigLake + # external tables or non-BigLake external tables. + # @!attribute [rw] connection + # @return [::String] + # Optional. The BigQuery connection used to create BigLake tables. + # Must be in the form + # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + # @!attribute [rw] location + # @return [::String] + # Optional. The location of the BigQuery dataset to publish BigLake + # external or non-BigLake external tables to. + # 1. If the Cloud Storage bucket is located in a multi-region bucket, then + # BigQuery dataset can be in the same multi-region bucket or any single + # region that is included in the same multi-region bucket. The datascan can + # be created in any single region that is included in the same multi-region + # bucket + # 2. If the Cloud Storage bucket is located in a dual-region bucket, then + # BigQuery dataset can be located in regions that are included in the + # dual-region bucket, or in a multi-region that includes the dual-region. + # The datascan can be created in any single region that is included in the + # same dual-region bucket. + # 3. If the Cloud Storage bucket is located in a single region, then + # BigQuery dataset can be in the same single region or any multi-region + # bucket that includes the same single region. The datascan will be created + # in the same single region as the bucket. + # 4. If the BigQuery dataset is in single region, it must be in the same + # single region as the datascan. + # + # For supported values, refer to + # https://cloud.google.com/bigquery/docs/locations#supported_locations. + # @!attribute [rw] project + # @return [::String] + # Optional. The project of the BigQuery dataset to publish BigLake external + # or non-BigLake external tables to. If not specified, the project of the + # Cloud Storage bucket will be used. The format is + # "projects/\\{project_id_or_number}". + class BigQueryPublishingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Determines how discovered tables are published. + module TableType + # Table type unspecified. + TABLE_TYPE_UNSPECIFIED = 0 + + # Default. Discovered tables are published as BigQuery external tables + # whose data is accessed using the credentials of the user querying the + # table. + EXTERNAL = 1 + + # Discovered tables are published as BigLake external tables whose data + # is accessed using the credentials of the associated BigQuery + # connection. + BIGLAKE = 2 + end + end + + # Configurations related to Cloud Storage as the data source. + # @!attribute [rw] include_patterns + # @return [::Array<::String>] + # Optional. Defines the data to include during discovery when only a subset + # of the data should be considered. Provide a list of patterns that + # identify the data to include. For Cloud Storage bucket assets, these + # patterns are interpreted as glob patterns used to match object names. For + # BigQuery dataset assets, these patterns are interpreted as patterns to + # match table names. + # @!attribute [rw] exclude_patterns + # @return [::Array<::String>] + # Optional. Defines the data to exclude during discovery. Provide a list of + # patterns that identify the data to exclude. For Cloud Storage bucket + # assets, these patterns are interpreted as glob patterns used to match + # object names. For BigQuery dataset assets, these patterns are interpreted + # as patterns to match table names. + # @!attribute [rw] csv_options + # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::StorageConfig::CsvOptions] + # Optional. Configuration for CSV data. + # @!attribute [rw] json_options + # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::StorageConfig::JsonOptions] + # Optional. Configuration for JSON data. + class StorageConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes CSV and similar semi-structured data formats. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter that is used to separate values. The default is + # `,` (comma). + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] type_inference_disabled + # @return [::Boolean] + # Optional. Whether to disable the inference of data types for CSV data. + # If true, all columns are registered as strings. + # @!attribute [rw] quote + # @return [::String] + # Optional. The character used to quote column values. Accepts `"` + # (double quotation mark) or `'` (single quotation mark). If unspecified, + # defaults to `"` (double quotation mark). + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] type_inference_disabled + # @return [::Boolean] + # Optional. Whether to disable the inference of data types for JSON data. + # If true, all columns are registered as their primitive types + # (strings, number, or boolean). + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # The output of a data discovery scan. + # @!attribute [r] bigquery_publishing + # @return [::Google::Cloud::Dataplex::V1::DataDiscoveryResult::BigQueryPublishing] + # Output only. Configuration for metadata publishing. + # @!attribute [r] scan_statistics + # @return [::Google::Cloud::Dataplex::V1::DataDiscoveryResult::ScanStatistics] + # Output only. Describes result statistics of a data scan discovery job. + class DataDiscoveryResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes BigQuery publishing configurations. + # @!attribute [r] dataset + # @return [::String] + # Output only. The BigQuery dataset the discovered tables are published to. + # @!attribute [r] location + # @return [::String] + # Output only. The location of the BigQuery publishing dataset. + class BigQueryPublishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes result statistics of a data scan discovery job. + # @!attribute [rw] scanned_file_count + # @return [::Integer] + # The number of files scanned. + # @!attribute [rw] data_processed_bytes + # @return [::Integer] + # The data processed in bytes. + # @!attribute [rw] files_excluded + # @return [::Integer] + # The number of files excluded. + # @!attribute [rw] tables_created + # @return [::Integer] + # The number of tables created. + # @!attribute [rw] tables_deleted + # @return [::Integer] + # The number of tables deleted. + # @!attribute [rw] tables_updated + # @return [::Integer] + # The number of tables updated. + # @!attribute [rw] filesets_created + # @return [::Integer] + # The number of filesets created. + # @!attribute [rw] filesets_deleted + # @return [::Integer] + # The number of filesets deleted. + # @!attribute [rw] filesets_updated + # @return [::Integer] + # The number of filesets updated. + class ScanStatistics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb new file mode 100644 index 000000000000..1ac56cf92238 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb @@ -0,0 +1,124 @@ +# 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 + # 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. + # @!attribute [r] table_result + # @return [::Google::Cloud::Dataplex::V1::DataDocumentationResult::TableResult] + # Output only. Table result for insights. + class DataDocumentationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Generated metadata about the table. + # @!attribute [r] name + # @return [::String] + # Output only. The service-qualified full resource name of the cloud + # resource. Ex: + # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + # @!attribute [r] overview + # @return [::String] + # Output only. Generated description of the table. + # @!attribute [r] schema + # @return [::Google::Cloud::Dataplex::V1::DataDocumentationResult::Schema] + # Output only. Schema of the table with generated metadata of the columns + # in the schema. + # @!attribute [r] queries + # @return [::Array<::Google::Cloud::Dataplex::V1::DataDocumentationResult::Query>] + # Output only. Sample SQL queries for the table. + class TableResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A sample SQL query in data documentation. + # @!attribute [r] sql + # @return [::String] + # Output only. The SQL query string which can be executed. + # @!attribute [r] description + # @return [::String] + # Output only. The description for the query. + class Query + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Schema of the table with generated metadata of columns. + # @!attribute [r] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::DataDocumentationResult::Field>] + # Output only. The list of columns. + class Schema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Column of a table with generated metadata and nested fields. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the column. + # @!attribute [r] description + # @return [::String] + # Output only. Generated description for columns and fields. + # @!attribute [r] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::DataDocumentationResult::Field>] + # Output only. Nested fields. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_products.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_products.rb new file mode 100644 index 000000000000..af6bd4291ba9 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb new file mode 100644 index 000000000000..9f61ed0c8218 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb @@ -0,0 +1,340 @@ +# 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 + # DataProfileScan related setting. + # @!attribute [rw] sampling_percent + # @return [::Float] + # Optional. The percentage of the records to be selected from the dataset for + # DataScan. + # + # * Value can range between 0.0 and 100.0 with up to 3 significant decimal + # digits. + # * Sampling is not applied if `sampling_percent` is not specified, 0 or + # 100. + # @!attribute [rw] row_filter + # @return [::String] + # Optional. A filter applied to all rows in a single DataScan job. + # The filter needs to be a valid SQL expression for a WHERE clause in + # BigQuery standard SQL syntax. + # Example: col1 >= 0 AND col2 < 10 + # @!attribute [rw] post_scan_actions + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions] + # Optional. Actions to take upon job completion.. + # @!attribute [rw] include_fields + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] + # Optional. The fields to include in data profile. + # + # If not specified, all fields at the time of profile scan job execution are + # included, except for ones listed in `exclude_fields`. + # @!attribute [rw] exclude_fields + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] + # Optional. The fields to exclude from data profile. + # + # If specified, the fields will be excluded from data profile, regardless of + # `include_fields` value. + # @!attribute [rw] catalog_publishing_enabled + # @return [::Boolean] + # Optional. If set, the latest DataScan job result will be published as + # Dataplex Universal Catalog metadata. + class DataProfileSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of post scan actions of DataProfileScan job. + # @!attribute [rw] bigquery_export + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions::BigQueryExport] + # Optional. If set, results will be exported to the provided BigQuery + # table. + class PostScanActions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of BigQuery export post scan action. + # @!attribute [rw] results_table + # @return [::String] + # Optional. The BigQuery table to export DataProfileScan results to. + # Format: + # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The specification for fields to include or exclude in data profile scan. + # @!attribute [rw] field_names + # @return [::Array<::String>] + # Optional. Expected input is a list of fully qualified names of fields as + # in the schema. + # + # Only top-level field names for nested fields are supported. + # For instance, if 'x' is of nested field type, listing 'x' is supported + # but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of + # 'x'. + class SelectedFields + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DataProfileResult defines the output of DataProfileScan. Each field of the + # table will have field type specific profile result. + # @!attribute [r] row_count + # @return [::Integer] + # Output only. The count of rows scanned. + # @!attribute [r] profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile] + # Output only. The profile information per field. + # @!attribute [r] scanned_data + # @return [::Google::Cloud::Dataplex::V1::ScannedData] + # Output only. The data scanned for this result. + # @!attribute [r] post_scan_actions_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult] + # Output only. The result of post scan actions. + # @!attribute [r] catalog_publishing_status + # @return [::Google::Cloud::Dataplex::V1::DataScanCatalogPublishingStatus] + # Output only. The status of publishing the data scan as Dataplex Universal + # Catalog metadata. + class DataProfileResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains name, type, mode and field type specific profile information. + # @!attribute [r] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field>] + # Output only. List of fields with structural and profile information for + # each field. + class Profile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A field within a table. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the field. + # @!attribute [r] type + # @return [::String] + # Output only. The data type retrieved from the schema of the data + # source. For instance, for a BigQuery native table, it is the [BigQuery + # Table + # Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). + # For a Dataplex Universal Catalog Entity, it is the [Entity + # Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). + # @!attribute [r] mode + # @return [::String] + # Output only. The mode of the field. Possible values include: + # + # * REQUIRED, if it is a required field. + # * NULLABLE, if it is an optional field. + # * REPEATED, if it is a repeated field. + # @!attribute [r] profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo] + # Output only. Profile information for the corresponding field. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The profile information for each field type. + # @!attribute [r] null_ratio + # @return [::Float] + # Output only. Ratio of rows with null value against total scanned + # rows. + # @!attribute [r] distinct_ratio + # @return [::Float] + # Output only. Ratio of rows with distinct values against total scanned + # rows. Not available for complex non-groupable field type, including + # RECORD, ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE + # mode. + # @!attribute [r] top_n_values + # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::TopNValue>] + # Output only. The list of top N non-null values, frequency and ratio + # with which they occur in the scanned data. N is 10 or equal to the + # number of distinct values in the field, whichever is smaller. Not + # available for complex non-groupable field type, including RECORD, + # ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode. + # @!attribute [rw] string_profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo] + # String type field information. + # + # Note: The following fields are mutually exclusive: `string_profile`, `integer_profile`, `double_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] integer_profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo] + # Integer type field information. + # + # Note: The following fields are mutually exclusive: `integer_profile`, `string_profile`, `double_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_profile + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo] + # Double type field information. + # + # Note: The following fields are mutually exclusive: `double_profile`, `string_profile`, `integer_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ProfileInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The profile information for a string type field. + # @!attribute [r] min_length + # @return [::Integer] + # Output only. Minimum length of non-null values in the scanned data. + # @!attribute [r] max_length + # @return [::Integer] + # Output only. Maximum length of non-null values in the scanned data. + # @!attribute [r] average_length + # @return [::Float] + # Output only. Average length of non-null values in the scanned data. + class StringFieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The profile information for an integer type field. + # @!attribute [r] average + # @return [::Float] + # Output only. Average of non-null values in the scanned data. NaN, + # if the field has a NaN. + # @!attribute [r] standard_deviation + # @return [::Float] + # Output only. Standard deviation of non-null values in the scanned + # data. NaN, if the field has a NaN. + # @!attribute [r] min + # @return [::Integer] + # Output only. Minimum of non-null values in the scanned data. NaN, + # if the field has a NaN. + # @!attribute [r] quartiles + # @return [::Array<::Integer>] + # Output only. A quartile divides the number of data points into four + # parts, or quarters, of more-or-less equal size. Three main + # quartiles used are: The first quartile (Q1) splits off the lowest + # 25% of data from the highest 75%. It is also known as the lower or + # 25th empirical quartile, as 25% of the data is below this point. + # The second quartile (Q2) is the median of a data set. So, 50% of + # the data lies below this point. The third quartile (Q3) splits off + # the highest 25% of data from the lowest 75%. It is known as the + # upper or 75th empirical quartile, as 75% of the data lies below + # this point. Here, the quartiles is provided as an ordered list of + # approximate quartile values for the scanned data, occurring in + # order Q1, median, Q3. + # @!attribute [r] max + # @return [::Integer] + # Output only. Maximum of non-null values in the scanned data. NaN, + # if the field has a NaN. + class IntegerFieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The profile information for a double type field. + # @!attribute [r] average + # @return [::Float] + # Output only. Average of non-null values in the scanned data. NaN, + # if the field has a NaN. + # @!attribute [r] standard_deviation + # @return [::Float] + # Output only. Standard deviation of non-null values in the scanned + # data. NaN, if the field has a NaN. + # @!attribute [r] min + # @return [::Float] + # Output only. Minimum of non-null values in the scanned data. NaN, + # if the field has a NaN. + # @!attribute [r] quartiles + # @return [::Array<::Float>] + # Output only. A quartile divides the number of data points into four + # parts, or quarters, of more-or-less equal size. Three main + # quartiles used are: The first quartile (Q1) splits off the lowest + # 25% of data from the highest 75%. It is also known as the lower or + # 25th empirical quartile, as 25% of the data is below this point. + # The second quartile (Q2) is the median of a data set. So, 50% of + # the data lies below this point. The third quartile (Q3) splits off + # the highest 25% of data from the lowest 75%. It is known as the + # upper or 75th empirical quartile, as 75% of the data lies below + # this point. Here, the quartiles is provided as an ordered list of + # quartile values for the scanned data, occurring in order Q1, + # median, Q3. + # @!attribute [r] max + # @return [::Float] + # Output only. Maximum of non-null values in the scanned data. NaN, + # if the field has a NaN. + class DoubleFieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Top N non-null values in the scanned data. + # @!attribute [r] value + # @return [::String] + # Output only. String value of a top N non-null value. + # @!attribute [r] count + # @return [::Integer] + # Output only. Count of the corresponding value in the scanned data. + # @!attribute [r] ratio + # @return [::Float] + # Output only. Ratio of the corresponding value in the field against + # the total number of rows in the scanned data. + class TopNValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + + # The result of post scan actions of DataProfileScan job. + # @!attribute [r] bigquery_export_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult] + # Output only. The result of BigQuery export post scan action. + class PostScanActionsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of BigQuery export post scan action. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult::State] + # Output only. Execution state for the BigQuery exporting. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the BigQuery exporting. + class BigQueryExportResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the exporting. + module State + # The exporting state is unspecified. + STATE_UNSPECIFIED = 0 + + # The exporting completed successfully. + SUCCEEDED = 1 + + # The exporting is no longer running due to an error. + FAILED = 2 + + # The exporting is skipped due to no valid scan result to export + # (usually caused by scan failed). + SKIPPED = 3 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb new file mode 100644 index 000000000000..7a4c569b5ca3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb @@ -0,0 +1,690 @@ +# 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 + # DataQualityScan related setting. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] + # Required. The list of rules to evaluate against a data source. At least one + # rule is required. + # @!attribute [rw] sampling_percent + # @return [::Float] + # Optional. The percentage of the records to be selected from the dataset for + # DataScan. + # + # * Value can range between 0.0 and 100.0 with up to 3 significant decimal + # digits. + # * Sampling is not applied if `sampling_percent` is not specified, 0 or + # 100. + # @!attribute [rw] row_filter + # @return [::String] + # Optional. A filter applied to all rows in a single DataScan job. + # The filter needs to be a valid SQL expression for a [WHERE clause in + # GoogleSQL + # syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#where_clause). + # + # Example: col1 >= 0 AND col2 < 10 + # @!attribute [rw] post_scan_actions + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions] + # Optional. Actions to take upon job completion. + # @!attribute [rw] catalog_publishing_enabled + # @return [::Boolean] + # Optional. If set, the latest DataScan job result will be published as + # Dataplex Universal Catalog metadata. + class DataQualitySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of post scan actions of DataQualityScan. + # @!attribute [rw] bigquery_export + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::BigQueryExport] + # Optional. If set, results will be exported to the provided BigQuery + # table. + # @!attribute [rw] notification_report + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::NotificationReport] + # Optional. If set, results will be sent to the provided notification + # receipts upon triggers. + class PostScanActions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration of BigQuery export post scan action. + # @!attribute [rw] results_table + # @return [::String] + # Optional. The BigQuery table to export DataQualityScan results to. + # Format: + # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + # or + # projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The individuals or groups who are designated to receive notifications + # upon triggers. + # @!attribute [rw] emails + # @return [::Array<::String>] + # Optional. The email recipients who will receive the DataQualityScan + # results report. + class Recipients + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This trigger is triggered when the DQ score in the job result is less + # than a specified input score. + # @!attribute [rw] score_threshold + # @return [::Float] + # Optional. The score range is in [0,100]. + class ScoreThresholdTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This trigger is triggered when the scan job itself fails, regardless of + # the result. + class JobFailureTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This trigger is triggered whenever a scan job run ends, regardless + # of the result. + class JobEndTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration of notification report post scan action. + # @!attribute [rw] recipients + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::Recipients] + # Required. The recipients who will receive the notification report. + # @!attribute [rw] score_threshold_trigger + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::ScoreThresholdTrigger] + # Optional. If set, report will be sent when score threshold is met. + # @!attribute [rw] job_failure_trigger + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobFailureTrigger] + # Optional. If set, report will be sent when a scan job fails. + # @!attribute [rw] job_end_trigger + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobEndTrigger] + # Optional. If set, report will be sent when a scan job ends. + class NotificationReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # The output of a DataQualityScan. + # @!attribute [r] passed + # @return [::Boolean] + # Output only. Overall data quality result -- `true` if all rules passed. + # @!attribute [r] score + # @return [::Float] + # Output only. The overall data quality score. + # + # The score ranges between [0, 100] (up to two decimal points). + # @!attribute [r] dimensions + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityDimensionResult>] + # Output only. A list of results at the dimension level. + # + # A dimension will have a corresponding `DataQualityDimensionResult` if and + # only if there is at least one rule with the 'dimension' field set to it. + # @!attribute [r] columns + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityColumnResult>] + # Output only. A list of results at the column level. + # + # A column will have a corresponding `DataQualityColumnResult` if and only if + # there is at least one rule with the 'column' field set to it. + # @!attribute [r] rules + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRuleResult>] + # Output only. A list of all the rules in a job, and their results. + # @!attribute [r] row_count + # @return [::Integer] + # Output only. The count of rows processed. + # @!attribute [r] scanned_data + # @return [::Google::Cloud::Dataplex::V1::ScannedData] + # Output only. The data scanned for this result. + # @!attribute [r] post_scan_actions_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult] + # Output only. The result of post scan actions. + # @!attribute [r] catalog_publishing_status + # @return [::Google::Cloud::Dataplex::V1::DataScanCatalogPublishingStatus] + # Output only. The status of publishing the data scan as Dataplex Universal + # Catalog metadata. + # @!attribute [r] anomaly_detection_generated_assets + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::AnomalyDetectionGeneratedAssets] + # Output only. The generated assets for anomaly detection. + class DataQualityResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of post scan actions of DataQualityScan job. + # @!attribute [r] bigquery_export_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult] + # Output only. The result of BigQuery export post scan action. + class PostScanActionsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of BigQuery export post scan action. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult::State] + # Output only. Execution state for the BigQuery exporting. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the BigQuery exporting. + class BigQueryExportResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the exporting. + module State + # The exporting state is unspecified. + STATE_UNSPECIFIED = 0 + + # The exporting completed successfully. + SUCCEEDED = 1 + + # The exporting is no longer running due to an error. + FAILED = 2 + + # The exporting is skipped due to no valid scan result to export + # (usually caused by scan failed). + SKIPPED = 3 + end + end + end + + # The assets generated by Anomaly Detection Data Scan. + # @!attribute [r] result_table + # @return [::String] + # Output only. The result table for anomaly detection. + # Format: + # PROJECT_ID.DATASET_ID.TABLE_ID + # If the result table is set at AnomalyDetectionAssets, the result table + # here would be the same as the one set in the + # AnomalyDetectionAssets.result_table. + # @!attribute [r] data_intermediate_table + # @return [::String] + # Output only. The intermediate table for data anomaly detection. + # Format: + # PROJECT_ID.DATASET_ID.TABLE_ID + # @!attribute [r] freshness_intermediate_table + # @return [::String] + # Output only. The intermediate table for freshness anomaly detection. + # Format: + # PROJECT_ID.DATASET_ID.TABLE_ID + # @!attribute [r] volume_intermediate_table + # @return [::String] + # Output only. The intermediate table for volume anomaly detection. + # Format: + # PROJECT_ID.DATASET_ID.TABLE_ID + class AnomalyDetectionGeneratedAssets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DataQualityRuleResult provides a more detailed, per-rule view of the results. + # @!attribute [r] rule + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule] + # Output only. The rule specified in the DataQualitySpec, as is. + # @!attribute [r] passed + # @return [::Boolean] + # Output only. Whether the rule passed or failed. + # @!attribute [r] evaluated_count + # @return [::Integer] + # Output only. The number of rows a rule was evaluated against. + # + # This field is only valid for row-level type rules. + # + # Evaluated count can be configured to either + # + # * include all rows (default) - with `null` rows automatically failing rule + # evaluation, or + # * exclude `null` rows from the `evaluated_count`, by setting + # `ignore_nulls = true`. + # + # This field is not set for rule SqlAssertion. + # @!attribute [r] passed_count + # @return [::Integer] + # Output only. The number of rows which passed a rule evaluation. + # + # This field is only valid for row-level type rules. + # + # This field is not set for rule SqlAssertion. + # @!attribute [r] null_count + # @return [::Integer] + # Output only. The number of rows with null values in the specified column. + # @!attribute [r] pass_ratio + # @return [::Float] + # Output only. The ratio of **passed_count / evaluated_count**. + # + # This field is only valid for row-level type rules. + # @!attribute [r] failing_rows_query + # @return [::String] + # Output only. The query to find rows that did not pass this rule. + # + # This field is only valid for row-level type rules. + # @!attribute [r] assertion_row_count + # @return [::Integer] + # Output only. The number of rows returned by the SQL statement in a SQL + # 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 + # the results. + # @!attribute [r] dimension + # @return [::Google::Cloud::Dataplex::V1::DataQualityDimension] + # Output only. The dimension config specified in the DataQualitySpec, as is. + # @!attribute [r] passed + # @return [::Boolean] + # Output only. Whether the dimension passed or failed. + # @!attribute [r] score + # @return [::Float] + # Output only. The dimension-level data quality score for this data scan job + # if and only if the 'dimension' field is set. + # + # The score ranges between [0, 100] (up to two decimal + # points). + class DataQualityDimensionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A dimension captures data quality intent about a defined subset of the rules + # specified. + # @!attribute [r] name + # @return [::String] + # Output only. The dimension name a rule belongs to. Custom dimension name is + # supported with all uppercase letters and maximum length of 30 characters. + class DataQualityDimension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A rule captures data quality intent about a data source. + # @!attribute [rw] range_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation] + # Row-level rule which evaluates whether each column value lies between a + # specified range. + # + # Note: The following fields are mutually exclusive: `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] non_null_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation] + # Row-level rule which evaluates whether each column value is null. + # + # Note: The following fields are mutually exclusive: `non_null_expectation`, `range_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] set_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation] + # Row-level rule which evaluates whether each column value is contained by + # a specified set. + # + # Note: The following fields are mutually exclusive: `set_expectation`, `range_expectation`, `non_null_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regex_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation] + # Row-level rule which evaluates whether each column value matches a + # specified regex. + # + # Note: The following fields are mutually exclusive: `regex_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uniqueness_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation] + # Row-level rule which evaluates whether each column value is unique. + # + # Note: The following fields are mutually exclusive: `uniqueness_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] statistic_range_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation] + # Aggregate rule which evaluates whether the column aggregate + # statistic lies between a specified range. + # + # Note: The following fields are mutually exclusive: `statistic_range_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] row_condition_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation] + # Row-level rule which evaluates whether each row in a table passes the + # specified condition. + # + # Note: The following fields are mutually exclusive: `row_condition_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] table_condition_expectation + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation] + # Aggregate rule which evaluates whether the provided expression is true + # for a table. + # + # Note: The following fields are mutually exclusive: `table_condition_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sql_assertion + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion] + # Aggregate rule which evaluates the number of rows returned for the + # provided statement. If any rows are returned, this rule fails. + # + # Note: The following fields are mutually exclusive: `sql_assertion`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] column + # @return [::String] + # Optional. The unnested column which this rule is evaluated against. + # @!attribute [rw] ignore_null + # @return [::Boolean] + # Optional. Rows with `null` values will automatically fail a rule, unless + # `ignore_null` is `true`. In that case, such `null` rows are trivially + # considered passing. + # + # This field is only valid for the following type of rules: + # + # * RangeExpectation + # * RegexExpectation + # * SetExpectation + # * UniquenessExpectation + # @!attribute [rw] dimension + # @return [::String] + # 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 + # @return [::Float] + # Optional. The minimum ratio of **passing_rows / total_rows** required to + # pass this rule, with a range of [0.0, 1.0]. + # + # 0 indicates default value (i.e. 1.0). + # + # This field is only valid for row-level type rules. + # @!attribute [rw] name + # @return [::String] + # Optional. A mutable name for the rule. + # + # * The name must contain only letters (a-z, A-Z), numbers (0-9), or + # hyphens (-). + # * The maximum length is 63 characters. + # * Must start with a letter. + # * Must end with a number or a letter. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the rule. + # + # * The maximum length is 1,024 characters. + # @!attribute [rw] suspended + # @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 + + # Evaluates whether each column value lies between a specified range. + # @!attribute [rw] min_value + # @return [::String] + # Optional. The minimum column value allowed for a row to pass this + # validation. At least one of `min_value` and `max_value` need to be + # provided. + # @!attribute [rw] max_value + # @return [::String] + # Optional. The maximum column value allowed for a row to pass this + # validation. At least one of `min_value` and `max_value` need to be + # provided. + # @!attribute [rw] strict_min_enabled + # @return [::Boolean] + # Optional. Whether each value needs to be strictly greater than ('>') the + # minimum, or if equality is allowed. + # + # Only relevant if a `min_value` has been defined. Default = false. + # @!attribute [rw] strict_max_enabled + # @return [::Boolean] + # Optional. Whether each value needs to be strictly lesser than ('<') the + # maximum, or if equality is allowed. + # + # Only relevant if a `max_value` has been defined. Default = false. + class RangeExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether each column value is null. + class NonNullExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether each column value is contained by a specified set. + # @!attribute [rw] values + # @return [::Array<::String>] + # Optional. Expected values for the column value. + class SetExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether each column value matches a specified regex. + # @!attribute [rw] regex + # @return [::String] + # Optional. A regular expression the column value is expected to match. + class RegexExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether the column has duplicates. + class UniquenessExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether the column aggregate statistic lies between a specified + # range. + # @!attribute [rw] statistic + # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic] + # Optional. The aggregate metric to evaluate. + # @!attribute [rw] min_value + # @return [::String] + # Optional. The minimum column statistic value allowed for a row to pass + # this validation. + # + # At least one of `min_value` and `max_value` need to be provided. + # @!attribute [rw] max_value + # @return [::String] + # Optional. The maximum column statistic value allowed for a row to pass + # this validation. + # + # At least one of `min_value` and `max_value` need to be provided. + # @!attribute [rw] strict_min_enabled + # @return [::Boolean] + # Optional. Whether column statistic needs to be strictly greater than + # ('>') the minimum, or if equality is allowed. + # + # Only relevant if a `min_value` has been defined. Default = false. + # @!attribute [rw] strict_max_enabled + # @return [::Boolean] + # Optional. Whether column statistic needs to be strictly lesser than ('<') + # the maximum, or if equality is allowed. + # + # Only relevant if a `max_value` has been defined. Default = false. + class StatisticRangeExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of aggregate metrics a rule can be evaluated against. + module ColumnStatistic + # Unspecified statistic type + STATISTIC_UNDEFINED = 0 + + # Evaluate the column mean + MEAN = 1 + + # Evaluate the column min + MIN = 2 + + # Evaluate the column max + MAX = 3 + end + end + + # Evaluates whether each row passes the specified condition. + # + # The SQL expression needs to use [GoogleSQL + # syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax) + # and should produce a boolean value per row as the result. + # + # Example: col1 >= 0 AND col2 < 10 + # @!attribute [rw] sql_expression + # @return [::String] + # Optional. The SQL expression. + class RowConditionExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Evaluates whether the provided expression is true. + # + # The SQL expression needs to use [GoogleSQL + # syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax) + # and should produce a scalar boolean result. + # + # Example: MIN(col1) >= 0 + # @!attribute [rw] sql_expression + # @return [::String] + # Optional. The SQL expression. + class TableConditionExpectation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A SQL statement that is evaluated to return rows that match an invalid + # state. If any rows are are returned, this rule fails. + # + # The SQL statement must use [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). + # + # Example: `SELECT * FROM ${data()} WHERE price < 0` + # @!attribute [rw] sql_statement + # @return [::String] + # Optional. The SQL statement. + class SqlAssertion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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 + # the results. + # @!attribute [r] column + # @return [::String] + # Output only. The column specified in the DataQualityRule. + # @!attribute [r] score + # @return [::Float] + # Output only. The column-level data quality score for this data scan job if + # and only if the 'column' field is set. + # + # The score ranges between between [0, 100] (up to two decimal + # points). + # @!attribute [r] passed + # @return [::Boolean] + # Output only. Whether the column passed or failed. + # @!attribute [r] dimensions + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityDimensionResult>] + # Output only. The dimension-level results for this column. + class DataQualityColumnResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb new file mode 100644 index 000000000000..504b5f710314 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb @@ -0,0 +1,567 @@ +# 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 + # DataTaxonomy represents a set of hierarchical DataAttributes resources, + # grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes + # to manage PII data. It is defined at project level. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the DataTaxonomy, of the form: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the dataTaxonomy. This + # ID will be different if the DataTaxonomy is deleted and re-created with the + # same name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataTaxonomy was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataTaxonomy was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the DataTaxonomy. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the DataTaxonomy. + # @!attribute [r] attribute_count + # @return [::Integer] + # Output only. The number of attributes in the DataTaxonomy. + # @!attribute [rw] etag + # @return [::String] + # This checksum is computed by the server based on the value of other + # fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [r] class_count + # @return [::Integer] + # Output only. The number of classes in the DataTaxonomy. + class DataTaxonomy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Denotes one dataAttribute in a dataTaxonomy, for example, PII. + # DataAttribute resources can be defined in a hierarchy. + # A single dataAttribute resource can contain specs of multiple types + # + # ``` + # PII + # - ResourceAccessSpec : + # - readers :foo@bar.com + # - DataAccessSpec : + # - readers :bar@foo.com + # ``` + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the dataAttribute, of the form: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id}. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the DataAttribute. + # This ID will be different if the DataAttribute is deleted and re-created + # with the same name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttribute was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttribute was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the DataAttribute. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the DataAttribute. + # @!attribute [rw] parent_id + # @return [::String] + # Optional. The ID of the parent DataAttribute resource, should belong to the + # same data taxonomy. Circular dependency in parent chain is not valid. + # Maximum depth of the hierarchy allowed is 4. + # [a -> b -> c -> d -> e, depth = 4] + # @!attribute [r] attribute_count + # @return [::Integer] + # Output only. The number of child attributes present for this attribute. + # @!attribute [rw] etag + # @return [::String] + # This checksum is computed by the server based on the value of other + # fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [rw] resource_access_spec + # @return [::Google::Cloud::Dataplex::V1::ResourceAccessSpec] + # Optional. Specified when applied to a resource (eg: Cloud Storage bucket, + # BigQuery dataset, BigQuery table). + # @!attribute [rw] data_access_spec + # @return [::Google::Cloud::Dataplex::V1::DataAccessSpec] + # Optional. Specified when applied to data stored on the resource (eg: rows, + # columns in BigQuery Tables). + class DataAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DataAttributeBinding represents binding of attributes to resources. Eg: Bind + # 'CustomerInfo' entity with 'PII' attribute. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the Data Attribute Binding, of + # the form: + # projects/\\{project_number}/locations/\\{location}/dataAttributeBindings/\\{data_attribute_binding_id} + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the + # DataAttributeBinding. This ID will be different if the DataAttributeBinding + # is deleted and re-created with the same name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttributeBinding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataAttributeBinding was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the DataAttributeBinding. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the DataAttributeBinding. + # @!attribute [rw] etag + # @return [::String] + # This checksum is computed by the server based on the value of other + # fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # Etags must be used when calling the DeleteDataAttributeBinding and the + # UpdateDataAttributeBinding method. + # @!attribute [rw] resource + # @return [::String] + # Optional. Immutable. The resource name of the resource that is associated + # to attributes. Presently, only entity resource is supported in the form: + # projects/\\{project}/locations/\\{location}/lakes/\\{lake}/zones/\\{zone}/entities/\\{entity_id} + # Must belong in the same project and region as the attribute binding, and + # there can only exist one active binding for a resource. + # @!attribute [rw] attributes + # @return [::Array<::String>] + # Optional. List of attributes to be associated with the resource, provided + # in the form: + # projects/\\{project}/locations/\\{location}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @!attribute [rw] paths + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding::Path>] + # Optional. The list of paths for items within the associated resource (eg. + # columns and partitions within a table) along with attribute bindings. + class DataAttributeBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a subresource of the given resource, and associated bindings + # with it. Currently supported subresources are column and partition schema + # fields within a table. + # @!attribute [rw] name + # @return [::String] + # Required. The name identifier of the path. + # Nested columns should be of the form: 'address.city'. + # @!attribute [rw] attributes + # @return [::Array<::String>] + # Optional. List of attributes to be associated with the path of the + # resource, provided in the form: + # projects/\\{project}/locations/\\{location}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + class Path + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Create DataTaxonomy request. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] parent + # @return [::String] + # @!attribute [rw] data_taxonomy_id + # @return [::String] + # Required. DataTaxonomy identifier. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must be between 1-63 characters. + # * Must end with a number or a letter. + # * Must be unique within the Project. + # @!attribute [rw] data_taxonomy + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # Required. DataTaxonomy resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update DataTaxonomy request. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] data_taxonomy + # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] + # Required. Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataTaxonomy request. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] name + # @return [::String] + class GetDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataTaxonomies request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the DataTaxonomy location, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of DataTaxonomies to return. The service may + # return fewer than this value. If unspecified, at most 10 DataTaxonomies + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous ` ListDataTaxonomies` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to ` ListDataTaxonomies` must match the call that + # provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListDataTaxonomiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataTaxonomies response. + # @!attribute [rw] data_taxonomies + # @return [::Array<::Google::Cloud::Dataplex::V1::DataTaxonomy>] + # DataTaxonomies under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataTaxonomiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete DataTaxonomy request. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value,the DeleteDataTaxonomy method returns an ABORTED error. + class DeleteDataTaxonomyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create DataAttribute request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @!attribute [rw] data_attribute_id + # @return [::String] + # Required. DataAttribute identifier. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must be between 1-63 characters. + # * Must end with a number or a letter. + # * Must be unique within the DataTaxonomy. + # @!attribute [rw] data_attribute + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # Required. DataAttribute resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update DataAttribute request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] data_attribute + # @return [::Google::Cloud::Dataplex::V1::DataAttribute] + # Required. Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataAttribute request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + class GetDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributes request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the DataTaxonomy: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of DataAttributes to return. The service may + # return fewer than this value. If unspecified, at most 10 dataAttributes + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListDataAttributes` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListDataAttributes` must match the call that + # provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListDataAttributesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributes response. + # @!attribute [rw] data_attributes + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttribute>] + # DataAttributes under the given parent DataTaxonomy. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataAttributesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete DataAttribute request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataAttribute: + # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} + # @!attribute [rw] etag + # @return [::String] + # Optional. If the client provided etag value does not match the current etag + # value, the DeleteDataAttribute method returns an ABORTED error response. + class DeleteDataAttributeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create DataAttributeBinding request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent data taxonomy + # projects/\\{project_number}/locations/\\{location_id} + # @!attribute [rw] data_attribute_binding_id + # @return [::String] + # Required. DataAttributeBinding identifier. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must be between 1-63 characters. + # * Must end with a number or a letter. + # * Must be unique within the Location. + # @!attribute [rw] data_attribute_binding + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # Required. DataAttributeBinding resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update DataAttributeBinding request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] data_attribute_binding + # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] + # Required. Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataAttributeBinding request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + class GetDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributeBindings request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the Location: + # projects/\\{project_number}/locations/\\{location_id} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of DataAttributeBindings to return. The service + # may return fewer than this value. If unspecified, at most 10 + # DataAttributeBindings will be returned. The maximum value is 1000; values + # above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListDataAttributeBindings` + # call. Provide this to retrieve the subsequent page. When paginating, all + # other parameters provided to `ListDataAttributeBindings` must match the + # call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # Filter using resource: filter=resource:"resource-name" + # Filter using attribute: filter=attributes:"attribute-name" + # Filter using attribute in paths list: + # filter=paths.attributes:"attribute-name" + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListDataAttributeBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataAttributeBindings response. + # @!attribute [rw] data_attribute_bindings + # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] + # DataAttributeBindings under the given parent Location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataAttributeBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete DataAttributeBinding request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataAttributeBinding: + # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} + # @!attribute [rw] etag + # @return [::String] + # Required. If the client provided etag value does not match the current etag + # value, the DeleteDataAttributeBindingRequest method returns an ABORTED + # error response. Etags must be used when calling the + # DeleteDataAttributeBinding. + class DeleteDataAttributeBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb new file mode 100644 index 000000000000..9ae7f17e597e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb @@ -0,0 +1,561 @@ +# 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 + # Create dataScan request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent location: + # `projects/{project}/locations/{location_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @!attribute [rw] data_scan + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # Required. DataScan resource. + # @!attribute [rw] data_scan_id + # @return [::String] + # Required. DataScan identifier. + # + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique within the customer project / location. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is `false`. + class CreateDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update dataScan request. + # @!attribute [rw] data_scan + # @return [::Google::Cloud::Dataplex::V1::DataScan] + # Required. DataScan resource to be updated. + # + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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 UpdateDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete dataScan request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataScan: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any child resources of this data scan will also + # be deleted. (Otherwise, the request will only work if the data scan has no + # child resources.) + class DeleteDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get dataScan request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the dataScan: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] + # Optional. Select the DataScan view to return. Defaults to `BASIC`. + class GetDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataScan view options. + module DataScanView + # The API will default to the `BASIC` view. + DATA_SCAN_VIEW_UNSPECIFIED = 0 + + # Basic view that does not include *spec* and *result*. + BASIC = 1 + + # Include everything. + FULL = 10 + end + end + + # List dataScans request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent location: + # `projects/{project}/locations/{location_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of dataScans to return. The service may return + # fewer than this value. If unspecified, at most 500 scans will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListDataScans` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListDataScans` must match the call that provided the + # page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields (`name` or `create_time`) for the result. + # If not specified, the ordering is undefined. + class ListDataScansRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List dataScans response. + # @!attribute [rw] data_scans + # @return [::Array<::Google::Cloud::Dataplex::V1::DataScan>] + # DataScans (`BASIC` view only) under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDataScansResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Run DataScan Request + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataScan: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # + # Only **OnDemand** data scans are allowed. + class RunDataScanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Run DataScan Response. + # @!attribute [rw] job + # @return [::Google::Cloud::Dataplex::V1::DataScanJob] + # DataScanJob created by RunDataScan request. + class RunDataScanResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get DataScanJob request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the DataScanJob: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] + # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. + class GetDataScanJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataScanJob view options. + module DataScanJobView + # The API will default to the `BASIC` view. + DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0 + + # Basic view that does not include *spec* and *result*. + BASIC = 1 + + # Include everything. + FULL = 10 + end + end + + # List DataScanJobs request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent environment: + # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of DataScanJobs to return. The service may return + # fewer than this value. If unspecified, at most 10 DataScanJobs will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListDataScanJobs` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListDataScanJobs` must match the call that provided + # the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression for filtering the results of the ListDataScanJobs + # request. + # + # If unspecified, all datascan jobs will be returned. Multiple filters can be + # applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + # + # Allowed fields are: + # + # - `start_time` + # - `end_time` + # + # `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + # 2018-10-08T18:30:00-07:00). + # + # For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + # 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + # specified start and end times. + class ListDataScanJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List DataScanJobs response. + # @!attribute [rw] data_scan_jobs + # @return [::Array<::Google::Cloud::Dataplex::V1::DataScanJob>] + # DataScanJobs (`BASIC` view only) under a given dataScan. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListDataScanJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request details for generating data quality rule recommendations. + # @!attribute [rw] name + # @return [::String] + # Required. The name must be one of the following: + # + # * The name of a data scan with at least one successful, completed data + # profiling job + # * The name of a successful, completed data profiling job (a data scan job + # where the job type is data profiling) + class GenerateDataQualityRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response details for data quality rule recommendations. + # @!attribute [rw] rule + # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] + # The data quality rules that Dataplex Universal Catalog generates based on + # the results of a data profiling scan. + class GenerateDataQualityRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a user-visible job which provides the insights for the related + # data source. + # + # For example: + # + # * Data quality: generates queries based on the rules and runs against the + # data to get data quality check results. For more information, see [Auto + # data quality + # overview](https://cloud.google.com/dataplex/docs/auto-data-quality-overview). + # * Data profile: analyzes the data in tables and generates insights about + # the structure, content and relationships (such as null percent, + # cardinality, min/max/mean, etc). For more information, see [About data + # profiling](https://cloud.google.com/dataplex/docs/data-profiling-overview). + # * Data discovery: scans data in Cloud Storage buckets to extract and then + # catalog metadata. For more information, see [Discover and catalog Cloud + # Storage data](https://cloud.google.com/bigquery/docs/automatic-discovery). + # * Data documentation: analyzes the table details and generates insights + # including descriptions and sample SQL queries for the table. For more + # information, see [Generate data insights in + # BigQuery](https://cloud.google.com/bigquery/docs/data-insights). + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The relative resource name of the scan, of the + # form: `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the scan. This ID will + # be different if the scan is deleted and re-created with the same name. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the scan. + # + # * Must be between 1-1024 characters. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # + # * Must be between 1-256 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the scan. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the DataScan. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the scan was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the scan was last updated. + # @!attribute [rw] data + # @return [::Google::Cloud::Dataplex::V1::DataSource] + # Required. The data source for DataScan. + # @!attribute [rw] execution_spec + # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionSpec] + # Optional. DataScan execution settings. + # + # If not specified, the fields in it will use their default values. + # @!attribute [r] execution_status + # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionStatus] + # Output only. Status of the data scan execution. + # @!attribute [r] type + # @return [::Google::Cloud::Dataplex::V1::DataScanType] + # Output only. The type of DataScan. + # @!attribute [rw] data_quality_spec + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] + # Settings for a data quality scan. + # + # Note: The following fields are mutually exclusive: `data_quality_spec`, `data_profile_spec`, `data_discovery_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_profile_spec + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] + # Settings for a data profile scan. + # + # Note: The following fields are mutually exclusive: `data_profile_spec`, `data_quality_spec`, `data_discovery_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_discovery_spec + # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec] + # Settings for a data discovery scan. + # + # Note: The following fields are mutually exclusive: `data_discovery_spec`, `data_quality_spec`, `data_profile_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_documentation_spec + # @return [::Google::Cloud::Dataplex::V1::DataDocumentationSpec] + # Settings for a data documentation scan. + # + # Note: The following fields are mutually exclusive: `data_documentation_spec`, `data_quality_spec`, `data_profile_spec`, `data_discovery_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_quality_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] + # Output only. The result of a data quality scan. + # + # Note: The following fields are mutually exclusive: `data_quality_result`, `data_profile_result`, `data_discovery_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_profile_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] + # Output only. The result of a data profile scan. + # + # Note: The following fields are mutually exclusive: `data_profile_result`, `data_quality_result`, `data_discovery_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_discovery_result + # @return [::Google::Cloud::Dataplex::V1::DataDiscoveryResult] + # Output only. The result of a data discovery scan. + # + # Note: The following fields are mutually exclusive: `data_discovery_result`, `data_quality_result`, `data_profile_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_documentation_result + # @return [::Google::Cloud::Dataplex::V1::DataDocumentationResult] + # Output only. The result of a data documentation scan. + # + # Note: The following fields are mutually exclusive: `data_documentation_result`, `data_quality_result`, `data_profile_result`, `data_discovery_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataScan + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataScan execution settings. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Dataplex::V1::Trigger] + # Optional. Spec related to how often and when a scan should be triggered. + # + # If not specified, the default is `OnDemand`, which means the scan will + # not run until the user calls `RunDataScan` API. + # @!attribute [rw] field + # @return [::String] + # Immutable. The unnested field (of type *Date* or *Timestamp*) that + # contains values which monotonically increase over time. + # + # If not specified, a data scan will run for all data in the table. + class ExecutionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of the data scan execution. + # @!attribute [rw] latest_job_start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time when the latest DataScanJob started. + # @!attribute [rw] latest_job_end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time when the latest DataScanJob ended. + # @!attribute [rw] latest_job_create_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The time when the DataScanJob execution was created. + class ExecutionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A DataScanJob represents an instance of DataScan execution. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The relative resource name of the DataScanJob, of + # the form: + # `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, + # where `project` refers to a *project_id* or *project_number* and + # `location_id` refers to a Google Cloud region. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the DataScanJob. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataScanJob was created. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataScanJob was started. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the DataScanJob ended. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::DataScanJob::State] + # Output only. Execution state for the DataScanJob. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the current state. + # @!attribute [r] type + # @return [::Google::Cloud::Dataplex::V1::DataScanType] + # Output only. The type of the parent DataScan. + # @!attribute [r] data_quality_spec + # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] + # Output only. Settings for a data quality scan. + # + # Note: The following fields are mutually exclusive: `data_quality_spec`, `data_profile_spec`, `data_discovery_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_profile_spec + # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] + # Output only. Settings for a data profile scan. + # + # Note: The following fields are mutually exclusive: `data_profile_spec`, `data_quality_spec`, `data_discovery_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_discovery_spec + # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec] + # Output only. Settings for a data discovery scan. + # + # Note: The following fields are mutually exclusive: `data_discovery_spec`, `data_quality_spec`, `data_profile_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_documentation_spec + # @return [::Google::Cloud::Dataplex::V1::DataDocumentationSpec] + # Output only. Settings for a data documentation scan. + # + # Note: The following fields are mutually exclusive: `data_documentation_spec`, `data_quality_spec`, `data_profile_spec`, `data_discovery_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_quality_result + # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] + # Output only. The result of a data quality scan. + # + # Note: The following fields are mutually exclusive: `data_quality_result`, `data_profile_result`, `data_discovery_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_profile_result + # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] + # Output only. The result of a data profile scan. + # + # Note: The following fields are mutually exclusive: `data_profile_result`, `data_quality_result`, `data_discovery_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_discovery_result + # @return [::Google::Cloud::Dataplex::V1::DataDiscoveryResult] + # Output only. The result of a data discovery scan. + # + # Note: The following fields are mutually exclusive: `data_discovery_result`, `data_quality_result`, `data_profile_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] data_documentation_result + # @return [::Google::Cloud::Dataplex::V1::DataDocumentationResult] + # Output only. The result of a data documentation scan. + # + # Note: The following fields are mutually exclusive: `data_documentation_result`, `data_quality_result`, `data_profile_result`, `data_discovery_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataScanJob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the DataScanJob. + module State + # The DataScanJob state is unspecified. + STATE_UNSPECIFIED = 0 + + # The DataScanJob is running. + RUNNING = 1 + + # The DataScanJob is canceling. + CANCELING = 2 + + # The DataScanJob cancellation was successful. + CANCELLED = 3 + + # The DataScanJob completed successfully. + SUCCEEDED = 4 + + # The DataScanJob is no longer running due to an error. + FAILED = 5 + + # The DataScanJob has been created but not started to run yet. + PENDING = 7 + end + end + + # The type of data scan. + module DataScanType + # The data scan type is unspecified. + DATA_SCAN_TYPE_UNSPECIFIED = 0 + + # Data quality scan. + DATA_QUALITY = 1 + + # Data profile scan. + DATA_PROFILE = 2 + + # Data discovery scan. + DATA_DISCOVERY = 3 + + # Data documentation scan. + DATA_DOCUMENTATION = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb new file mode 100644 index 000000000000..daeeb360bac0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb @@ -0,0 +1,52 @@ +# 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 + # The status of publishing the data scan result as Dataplex Universal Catalog + # 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 publishing. + class DataScanCatalogPublishingStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the publishing. + module State + # The publishing state is unspecified. + STATE_UNSPECIFIED = 0 + + # Publishing to catalog completed successfully. + SUCCEEDED = 1 + + # Publish to catalog failed. + FAILED = 2 + + # Publishing to catalog was skipped. + SKIPPED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb new file mode 100644 index 000000000000..e1b7ee3dcec4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb @@ -0,0 +1,964 @@ +# 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 + # The payload associated with Discovery data processing. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] lake_id + # @return [::String] + # The id of the associated lake. + # @!attribute [rw] zone_id + # @return [::String] + # The id of the associated zone. + # @!attribute [rw] asset_id + # @return [::String] + # The id of the associated asset. + # @!attribute [rw] data_location + # @return [::String] + # The data location associated with the event. + # @!attribute [rw] datascan_id + # @return [::String] + # The id of the associated datascan for standalone discovery. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EventType] + # The type of the event being logged. + # @!attribute [rw] config + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ConfigDetails] + # Details about discovery configuration in effect. + # + # Note: The following fields are mutually exclusive: `config`, `entity`, `partition`, `action`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityDetails] + # Details about the entity associated with the event. + # + # Note: The following fields are mutually exclusive: `entity`, `config`, `partition`, `action`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] partition + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::PartitionDetails] + # Details about the partition associated with the event. + # + # Note: The following fields are mutually exclusive: `partition`, `config`, `entity`, `action`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] action + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ActionDetails] + # Details about the action associated with the event. + # + # Note: The following fields are mutually exclusive: `action`, `config`, `entity`, `partition`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] table + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::TableDetails] + # Details about the BigQuery table publishing associated with the event. + # + # Note: The following fields are mutually exclusive: `table`, `config`, `entity`, `partition`, `action`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DiscoveryEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details about configuration events. + # @!attribute [rw] parameters + # @return [::Google::Protobuf::Map{::String => ::String}] + # A list of discovery configuration parameters in effect. + # The keys are the field paths within DiscoverySpec. + # Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, + # etc. + class ConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ParametersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Details about the entity. + # @!attribute [rw] entity + # @return [::String] + # The name of the entity resource. + # The name is the fully-qualified resource name. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] + # The type of the entity resource. + class EntityDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the published table. + # @!attribute [rw] table + # @return [::String] + # The fully-qualified resource name of the table resource. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::TableType] + # The type of the table resource. + class TableDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the partition. + # @!attribute [rw] partition + # @return [::String] + # The name to the partition resource. + # The name is the fully-qualified resource name. + # @!attribute [rw] entity + # @return [::String] + # The name to the containing entity resource. + # The name is the fully-qualified resource name. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] + # The type of the containing entity resource. + # @!attribute [rw] sampled_data_locations + # @return [::Array<::String>] + # The locations of the data items (e.g., a Cloud Storage objects) sampled + # for metadata inference. + class PartitionDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the action. + # @!attribute [rw] type + # @return [::String] + # The type of action. + # Eg. IncompatibleDataSchema, InvalidDataFormat + # @!attribute [rw] issue + # @return [::String] + # The human readable issue associated with the action. + class ActionDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the event. + module EventType + # An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0 + + # An event representing discovery configuration in effect. + CONFIG = 1 + + # An event representing a metadata entity being created. + ENTITY_CREATED = 2 + + # An event representing a metadata entity being updated. + ENTITY_UPDATED = 3 + + # An event representing a metadata entity being deleted. + ENTITY_DELETED = 4 + + # An event representing a partition being created. + PARTITION_CREATED = 5 + + # An event representing a partition being updated. + PARTITION_UPDATED = 6 + + # An event representing a partition being deleted. + PARTITION_DELETED = 7 + + # An event representing a table being published. + TABLE_PUBLISHED = 10 + + # An event representing a table being updated. + TABLE_UPDATED = 11 + + # An event representing a table being skipped in publishing. + TABLE_IGNORED = 12 + + # An event representing a table being deleted. + TABLE_DELETED = 13 + end + + # The type of the entity. + module EntityType + # An unspecified event type. + ENTITY_TYPE_UNSPECIFIED = 0 + + # Entities representing structured data. + TABLE = 1 + + # Entities representing unstructured data. + FILESET = 2 + end + + # The type of the published table. + module TableType + # An unspecified table type. + TABLE_TYPE_UNSPECIFIED = 0 + + # External table type. + EXTERNAL_TABLE = 1 + + # BigLake table type. + BIGLAKE_TABLE = 2 + + # Object table type for unstructured data. + OBJECT_TABLE = 3 + end + end + + # The payload associated with Job logs that contains events describing jobs + # that have run within a Lake. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] job_id + # @return [::String] + # The unique id identifying the job. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time when the job started running. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the job ended running. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::JobEvent::State] + # The job state on completion. + # @!attribute [rw] retries + # @return [::Integer] + # The number of retries. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::JobEvent::Type] + # The type of the job. + # @!attribute [rw] service + # @return [::Google::Cloud::Dataplex::V1::JobEvent::Service] + # The service used to execute the job. + # @!attribute [rw] service_job + # @return [::String] + # The reference to the job within the service. + # @!attribute [rw] execution_trigger + # @return [::Google::Cloud::Dataplex::V1::JobEvent::ExecutionTrigger] + # Job execution trigger. + class JobEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the job. + module Type + # Unspecified job type. + TYPE_UNSPECIFIED = 0 + + # Spark jobs. + SPARK = 1 + + # Notebook jobs. + NOTEBOOK = 2 + end + + # The completion status of the job. + module State + # Unspecified job state. + STATE_UNSPECIFIED = 0 + + # Job successfully completed. + SUCCEEDED = 1 + + # Job was unsuccessful. + FAILED = 2 + + # Job was cancelled by the user. + CANCELLED = 3 + + # Job was cancelled or aborted via the service executing the job. + ABORTED = 4 + end + + # The service used to execute the job. + module Service + # Unspecified service. + SERVICE_UNSPECIFIED = 0 + + # Cloud Dataproc. + DATAPROC = 1 + end + + # Job Execution trigger. + module ExecutionTrigger + # The job execution trigger is unspecified. + EXECUTION_TRIGGER_UNSPECIFIED = 0 + + # The job was triggered by Dataplex Universal Catalog based on trigger spec + # from task definition. + TASK_CONFIG = 1 + + # The job was triggered by the explicit call of Task API. + RUN_REQUEST = 2 + end + end + + # These messages contain information about sessions within an environment. + # The monitored resource is 'Environment'. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] user_id + # @return [::String] + # The information about the user that created the session. It will be the + # email address of the user. + # @!attribute [rw] session_id + # @return [::String] + # Unique identifier for the session. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::SessionEvent::EventType] + # The type of the event. + # @!attribute [rw] query + # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail] + # The execution details of the query. + # @!attribute [rw] event_succeeded + # @return [::Boolean] + # The status of the event. + # @!attribute [rw] fast_startup_enabled + # @return [::Boolean] + # If the session is associated with an environment with fast startup enabled, + # and was created before being assigned to a user. + # @!attribute [rw] unassigned_duration + # @return [::Google::Protobuf::Duration] + # The idle duration of a warm pooled session before it is assigned to user. + class SessionEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution details of the query. + # @!attribute [rw] query_id + # @return [::String] + # The unique Query id identifying the query. + # @!attribute [rw] query_text + # @return [::String] + # The query text executed. + # @!attribute [rw] engine + # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail::Engine] + # Query Execution engine. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Time taken for execution of the query. + # @!attribute [rw] result_size_bytes + # @return [::Integer] + # The size of results the query produced. + # @!attribute [rw] data_processed_bytes + # @return [::Integer] + # The data processed by the query. + class QueryDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Query Execution engine. + module Engine + # An unspecified Engine type. + ENGINE_UNSPECIFIED = 0 + + # Spark-sql engine is specified in Query. + SPARK_SQL = 1 + + # BigQuery engine is specified in Query. + BIGQUERY = 2 + end + end + + # The type of the event. + module EventType + # An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0 + + # Event when the session is assigned to a user. + START = 1 + + # Event for stop of a session. + STOP = 2 + + # Query events in the session. + QUERY = 3 + + # Event for creation of a cluster. It is not yet assigned to a user. + # This comes before START in the sequence + CREATE = 4 + end + end + + # Payload associated with Governance related log events. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] event_type + # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::EventType] + # The type of the event. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity] + # Entity resource information if the log event is associated with a + # specific entity. + class GovernanceEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about Entity resource that the log event is associated with. + # @!attribute [rw] entity + # @return [::String] + # The Entity resource the log event is associated with. + # Format: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` + # @!attribute [rw] entity_type + # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity::EntityType] + # Type of entity. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of entity. + module EntityType + # An unspecified Entity type. + ENTITY_TYPE_UNSPECIFIED = 0 + + # Table entity type. + TABLE = 1 + + # Fileset entity type. + FILESET = 2 + end + end + + # Type of governance log event. + module EventType + # An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0 + + # Resource IAM policy update event. + RESOURCE_IAM_POLICY_UPDATE = 1 + + # BigQuery table create event. + BIGQUERY_TABLE_CREATE = 2 + + # BigQuery table update event. + BIGQUERY_TABLE_UPDATE = 3 + + # BigQuery table delete event. + BIGQUERY_TABLE_DELETE = 4 + + # BigQuery connection create event. + BIGQUERY_CONNECTION_CREATE = 5 + + # BigQuery connection update event. + BIGQUERY_CONNECTION_UPDATE = 6 + + # BigQuery connection delete event. + BIGQUERY_CONNECTION_DELETE = 7 + + # BigQuery taxonomy created. + BIGQUERY_TAXONOMY_CREATE = 10 + + # BigQuery policy tag created. + BIGQUERY_POLICY_TAG_CREATE = 11 + + # BigQuery policy tag deleted. + BIGQUERY_POLICY_TAG_DELETE = 12 + + # BigQuery set iam policy for policy tag. + BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13 + + # Access policy update event. + ACCESS_POLICY_UPDATE = 14 + + # Number of resources matched with particular Query. + GOVERNANCE_RULE_MATCHED_RESOURCES = 15 + + # Rule processing exceeds the allowed limit. + GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16 + + # Rule processing errors. + GOVERNANCE_RULE_ERRORS = 17 + + # Governance rule processing Event. + GOVERNANCE_RULE_PROCESSING = 18 + end + end + + # These messages contain information about the execution of a datascan. + # The monitored resource is 'DataScan' + # @!attribute [rw] data_source + # @return [::String] + # The data source of the data scan + # @!attribute [rw] job_id + # @return [::String] + # The identifier of the specific data scan job this log entry is for. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the data scan job was created. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time when the data scan job started to run. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time when the data scan job finished. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::ScanType] + # The type of the data scan. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::State] + # The status of the data scan job. + # @!attribute [rw] message + # @return [::String] + # The message describing the data scan job event. + # @!attribute [rw] spec_version + # @return [::String] + # A version identifier of the spec which was used to execute this job. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Trigger] + # The trigger type of the data scan job. + # @!attribute [rw] scope + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Scope] + # The scope of the data scan (e.g. full, incremental). + # @!attribute [rw] data_profile + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileResult] + # Data profile result for data profile type data scan. + # + # Note: The following fields are mutually exclusive: `data_profile`, `data_quality`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_quality + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityResult] + # Data quality result for data quality type data scan. + # + # Note: The following fields are mutually exclusive: `data_quality`, `data_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_profile_configs + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileAppliedConfigs] + # Applied configs for data profile type data scan. + # + # Note: The following fields are mutually exclusive: `data_profile_configs`, `data_quality_configs`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_quality_configs + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityAppliedConfigs] + # Applied configs for data quality type data scan. + # + # Note: The following fields are mutually exclusive: `data_quality_configs`, `data_profile_configs`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] post_scan_actions_result + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult] + # The result of post scan actions. + # @!attribute [rw] catalog_publishing_status + # @return [::Google::Cloud::Dataplex::V1::DataScanCatalogPublishingStatus] + # The status of publishing the data scan as Dataplex Universal Catalog + # metadata. + class DataScanEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Data profile result for data scan job. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows processed in the data scan job. + class DataProfileResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data quality result for data scan job. + # @!attribute [rw] row_count + # @return [::Integer] + # The count of rows processed in the data scan job. + # @!attribute [rw] passed + # @return [::Boolean] + # Whether the data quality result was `pass` or not. + # @!attribute [rw] dimension_passed + # @return [::Google::Protobuf::Map{::String => ::Boolean}] + # The result of each dimension for data quality result. + # The key of the map is the name of the dimension. + # The value is the bool value depicting whether the dimension result was + # `pass` or not. + # @!attribute [rw] score + # @return [::Float] + # The table-level data quality score for the data scan job. + # + # The data quality score ranges between [0, 100] (up to two decimal + # points). + # @!attribute [rw] dimension_score + # @return [::Google::Protobuf::Map{::String => ::Float}] + # The score of each dimension for data quality result. + # The key of the map is the name of the dimension. + # The value is the data quality score for the dimension. + # + # The score ranges between [0, 100] (up to two decimal + # points). + # @!attribute [rw] column_score + # @return [::Google::Protobuf::Map{::String => ::Float}] + # The score of each column scanned in the data scan job. + # The key of the map is the name of the column. + # The value is the data quality score for the column. + # + # The score ranges between [0, 100] (up to two decimal + # points). + class DataQualityResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Boolean] + class DimensionPassedEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Float] + class DimensionScoreEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Float] + class ColumnScoreEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Applied configs for data profile type data scan job. + # @!attribute [rw] sampling_percent + # @return [::Float] + # The percentage of the records selected from the dataset for DataScan. + # + # * Value ranges between 0.0 and 100.0. + # * Value 0.0 or 100.0 imply that sampling was not applied. + # @!attribute [rw] row_filter_applied + # @return [::Boolean] + # Boolean indicating whether a row filter was applied in the DataScan job. + # @!attribute [rw] column_filter_applied + # @return [::Boolean] + # Boolean indicating whether a column filter was applied in the DataScan + # job. + class DataProfileAppliedConfigs + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Applied configs for data quality type data scan job. + # @!attribute [rw] sampling_percent + # @return [::Float] + # The percentage of the records selected from the dataset for DataScan. + # + # * Value ranges between 0.0 and 100.0. + # * Value 0.0 or 100.0 imply that sampling was not applied. + # @!attribute [rw] row_filter_applied + # @return [::Boolean] + # Boolean indicating whether a row filter was applied in the DataScan job. + class DataQualityAppliedConfigs + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Post scan actions result for data scan job. + # @!attribute [rw] bigquery_export_result + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult] + # The result of BigQuery export post scan action. + class PostScanActionsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of BigQuery export post scan action. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult::State] + # Execution state for the BigQuery exporting. + # @!attribute [rw] message + # @return [::String] + # Additional information about the BigQuery exporting. + class BigQueryExportResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Execution state for the exporting. + module State + # The exporting state is unspecified. + STATE_UNSPECIFIED = 0 + + # The exporting completed successfully. + SUCCEEDED = 1 + + # The exporting is no longer running due to an error. + FAILED = 2 + + # The exporting is skipped due to no valid scan result to export + # (usually caused by scan failed). + SKIPPED = 3 + end + end + end + + # The type of the data scan. + module ScanType + # An unspecified data scan type. + SCAN_TYPE_UNSPECIFIED = 0 + + # Data scan for data profile. + DATA_PROFILE = 1 + + # Data scan for data quality. + DATA_QUALITY = 2 + + # Data scan for data discovery. + DATA_DISCOVERY = 4 + end + + # The job state of the data scan. + module State + # Unspecified job state. + STATE_UNSPECIFIED = 0 + + # Data scan job started. + STARTED = 1 + + # Data scan job successfully completed. + SUCCEEDED = 2 + + # Data scan job was unsuccessful. + FAILED = 3 + + # Data scan job was cancelled. + CANCELLED = 4 + + # Data scan job was created. + CREATED = 5 + end + + # The trigger type for the data scan. + module Trigger + # An unspecified trigger type. + TRIGGER_UNSPECIFIED = 0 + + # Data scan triggers on demand. + ON_DEMAND = 1 + + # Data scan triggers as per schedule. + SCHEDULE = 2 + + # Data scan is run one time on creation. + ONE_TIME = 3 + end + + # The scope of job for the data scan. + module Scope + # An unspecified scope type. + SCOPE_UNSPECIFIED = 0 + + # Data scan runs on all of the data. + FULL = 1 + + # Data scan runs on incremental data. + INCREMENTAL = 2 + end + end + + # Information about the result of a data quality rule for data quality scan. + # The monitored resource is 'DataScan'. + # @!attribute [rw] job_id + # @return [::String] + # Identifier of the specific data scan job this log entry is for. + # @!attribute [rw] data_source + # @return [::String] + # The data source of the data scan (e.g. BigQuery table name). + # @!attribute [rw] column + # @return [::String] + # The column which this rule is evaluated against. + # @!attribute [rw] rule_name + # @return [::String] + # The name of the data quality rule. + # @!attribute [rw] rule_type + # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::RuleType] + # The type of the data quality rule. + # @!attribute [rw] evalution_type + # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::EvaluationType] + # The evaluation type of the data quality rule. + # @!attribute [rw] rule_dimension + # @return [::String] + # The dimension of the data quality rule. + # @!attribute [rw] threshold_percent + # @return [::Float] + # The passing threshold ([0.0, 100.0]) of the data quality rule. + # @!attribute [rw] result + # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::Result] + # The result of the data quality rule. + # @!attribute [rw] evaluated_row_count + # @return [::Integer] + # The number of rows evaluated against the data quality rule. + # This field is only valid for rules of PER_ROW evaluation type. + # @!attribute [rw] passed_row_count + # @return [::Integer] + # The number of rows which passed a rule evaluation. + # This field is only valid for rules of PER_ROW evaluation type. + # @!attribute [rw] null_row_count + # @return [::Integer] + # The number of rows with null values in the specified column. + # @!attribute [rw] assertion_row_count + # @return [::Integer] + # The number of rows returned by the SQL statement in a SQL assertion rule. + # This field is only valid for SQL assertion rules. + class DataQualityScanRuleResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the data quality rule. + module RuleType + # An unspecified rule type. + RULE_TYPE_UNSPECIFIED = 0 + + # See + # {::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation DataQualityRule.NonNullExpectation}. + NON_NULL_EXPECTATION = 1 + + # See + # {::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation DataQualityRule.RangeExpectation}. + RANGE_EXPECTATION = 2 + + # See + # {::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation DataQualityRule.RegexExpectation}. + REGEX_EXPECTATION = 3 + + # See + # {::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation DataQualityRule.RowConditionExpectation}. + ROW_CONDITION_EXPECTATION = 4 + + # See + # {::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation DataQualityRule.SetExpectation}. + SET_EXPECTATION = 5 + + # See + # {::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation DataQualityRule.StatisticRangeExpectation}. + STATISTIC_RANGE_EXPECTATION = 6 + + # See + # {::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation DataQualityRule.TableConditionExpectation}. + TABLE_CONDITION_EXPECTATION = 7 + + # See + # {::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation DataQualityRule.UniquenessExpectation}. + UNIQUENESS_EXPECTATION = 8 + + # See + # {::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion DataQualityRule.SqlAssertion}. + SQL_ASSERTION = 9 + end + + # The evaluation type of the data quality rule. + module EvaluationType + # An unspecified evaluation type. + EVALUATION_TYPE_UNSPECIFIED = 0 + + # The rule evaluation is done at per row level. + PER_ROW = 1 + + # The rule evaluation is done for an aggregate of rows. + AGGREGATE = 2 + end + + # Whether the data quality rule passed or failed. + module Result + # An unspecified result. + RESULT_UNSPECIFIED = 0 + + # The data quality rule passed. + PASSED = 1 + + # The data quality rule failed. + FAILED = 2 + end + end + + # Payload associated with Business Glossary related log events. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] event_type + # @return [::Google::Cloud::Dataplex::V1::BusinessGlossaryEvent::EventType] + # The type of the event. + # @!attribute [rw] resource + # @return [::String] + # Name of the resource. + class BusinessGlossaryEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of glossary log event. + module EventType + # An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0 + + # Glossary create event. + GLOSSARY_CREATE = 1 + + # Glossary update event. + GLOSSARY_UPDATE = 2 + + # Glossary delete event. + GLOSSARY_DELETE = 3 + + # Glossary category create event. + GLOSSARY_CATEGORY_CREATE = 4 + + # Glossary category update event. + GLOSSARY_CATEGORY_UPDATE = 5 + + # Glossary category delete event. + GLOSSARY_CATEGORY_DELETE = 6 + + # Glossary term create event. + GLOSSARY_TERM_CREATE = 7 + + # Glossary term update event. + GLOSSARY_TERM_UPDATE = 8 + + # Glossary term delete event. + GLOSSARY_TERM_DELETE = 9 + end + end + + # Payload associated with Entry related log events. + # @!attribute [rw] message + # @return [::String] + # The log message. + # @!attribute [rw] event_type + # @return [::Google::Cloud::Dataplex::V1::EntryLinkEvent::EventType] + # The type of the event. + # @!attribute [rw] resource + # @return [::String] + # Name of the resource. + class EntryLinkEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of entry link log event. + module EventType + # An unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0 + + # EntryLink create event. + ENTRY_LINK_CREATE = 1 + + # EntryLink delete event. + ENTRY_LINK_DELETE = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb new file mode 100644 index 000000000000..9c2e28a54d24 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb @@ -0,0 +1,741 @@ +# 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 + # Create a metadata entity request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::Entity] + # Required. Entity resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update a metadata entity request. + # The exiting entity will be fully replaced by the entity in the request. + # The entity ID is mutable. To modify the ID, use the current entity ID in the + # request URL and specify the new ID in the request body. + # @!attribute [rw] entity + # @return [::Google::Cloud::Dataplex::V1::Entity] + # Required. Update description. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete a metadata entity request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @!attribute [rw] etag + # @return [::String] + # Required. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. + class DeleteEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List metadata entities request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] + # Required. Specify the entity view to make a partial list request. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of entities to return. The service may return + # fewer than this value. If unspecified, 100 entities will be returned by + # default. The maximum value is 500; larger values will will be truncated to + # 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListEntities` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListEntities` must match the call that provided the + # page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. The following filter parameters can be added to the URL to limit + # the entities returned by the API: + # + # - Entity ID: ?filter="id=entityID" + # - Asset ID: ?filter="asset=assetID" + # - Data path ?filter="data_path=gs://my-bucket" + # - Is HIVE compatible: ?filter="hive_compatible=true" + # - Is BigQuery compatible: ?filter="bigquery_compatible=true" + class ListEntitiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entity views. + module EntityView + # The default unset value. Return both table and fileset entities + # if unspecified. + ENTITY_VIEW_UNSPECIFIED = 0 + + # Only list table entities. + TABLES = 1 + + # Only list fileset entities. + FILESETS = 2 + end + end + + # List metadata entities response. + # @!attribute [rw] entities + # @return [::Array<::Google::Cloud::Dataplex::V1::Entity>] + # Entities in the specified parent zone. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # remaining results in the list. + class ListEntitiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get metadata entity request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` + # @!attribute [rw] view + # @return [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] + # Optional. Used to select the subset of entity information to return. + # Defaults to `BASIC`. + class GetEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entity views for get entity partial result. + module EntityView + # The API will default to the `BASIC` view. + ENTITY_VIEW_UNSPECIFIED = 0 + + # Minimal view that does not include the schema. + BASIC = 1 + + # Include basic information and schema. + SCHEMA = 2 + + # Include everything. Currently, this is the same as the SCHEMA view. + FULL = 4 + end + end + + # List metadata partitions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent entity: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of partitions to return. The service may return + # fewer than this value. If unspecified, 100 partitions will be returned by + # default. The maximum page size is 500; larger values will will be truncated + # to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListPartitions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListPartitions` must match the call that provided + # the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter the partitions returned to the caller using a key value + # pair expression. Supported operators and syntax: + # + # - logic operators: AND, OR + # - comparison operators: <, >, >=, <= ,=, != + # - LIKE operators: + # - The right hand of a LIKE operator supports "." and + # "*" for wildcard searches, for example "value1 LIKE ".*oo.*" + # - parenthetical grouping: ( ) + # + # Sample filter expression: `?filter="key1 < value1 OR key2 > value2" + # + # **Notes:** + # + # - Keys to the left of operators are case insensitive. + # - Partition results are sorted first by creation time, then by + # lexicographic order. + # - Up to 20 key value filter pairs are allowed, but due to performance + # considerations, only the first 10 will be used as a filter. + class ListPartitionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create metadata partition request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # @!attribute [rw] partition + # @return [::Google::Cloud::Dataplex::V1::Partition] + # Required. Partition resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreatePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete metadata partition request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the partition. + # format: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + # The \\{partition_value_path} segment consists of an ordered sequence of + # partition values separated by "/". All values must be provided. + # @!attribute [rw] etag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. The etag associated with the partition. + class DeletePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List metadata partitions response. + # @!attribute [rw] partitions + # @return [::Array<::Google::Cloud::Dataplex::V1::Partition>] + # Partitions under the specified parent entity. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # remaining results in the list. + class ListPartitionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get metadata partition request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the partition: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. + # The \\{partition_value_path} segment consists of an ordered sequence of + # partition values separated by "/". All values must be provided. + class GetPartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents tables and fileset metadata contained within a zone. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the entity, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Display name must be shorter than or equal to 256 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User friendly longer description text. Must be shorter than or + # equal to 1024 characters. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the entity was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the entity was last updated. + # @!attribute [rw] id + # @return [::String] + # Required. A user-provided entity ID. It is mutable, and will be used as the + # published table name. Specifying a new ID in an update entity + # request will override the existing value. + # The ID must contain only letters (a-z, A-Z), numbers (0-9), and + # underscores, and consist of 256 or fewer characters. + # @!attribute [rw] etag + # @return [::String] + # Optional. The etag associated with the entity, which can be retrieved with + # a [GetEntity][] request. Required for update and delete requests. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Entity::Type] + # Required. Immutable. The type of entity. + # @!attribute [rw] asset + # @return [::String] + # Required. Immutable. The ID of the asset associated with the storage + # location containing the entity data. The entity must be with in the same + # zone with the asset. + # @!attribute [rw] data_path + # @return [::String] + # Required. Immutable. The storage path of the entity data. + # For Cloud Storage data, this is the fully-qualified path to the entity, + # such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of + # the table resource, such as + # `projects/project_id/datasets/dataset_id/tables/table_id`. + # @!attribute [rw] data_path_pattern + # @return [::String] + # Optional. The set of items within the data path constituting the data in + # the entity, represented as a glob path. Example: + # `gs://bucket/path/to/data/**/*.csv`. + # @!attribute [r] catalog_entry + # @return [::String] + # Output only. The name of the associated Data Catalog entry. + # @!attribute [rw] system + # @return [::Google::Cloud::Dataplex::V1::StorageSystem] + # Required. Immutable. Identifies the storage system of the entity data. + # @!attribute [rw] format + # @return [::Google::Cloud::Dataplex::V1::StorageFormat] + # Required. Identifies the storage format of the entity data. + # It does not apply to entities with data stored in BigQuery. + # @!attribute [r] compatibility + # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus] + # Output only. Metadata stores that the entity is compatible with. + # @!attribute [r] access + # @return [::Google::Cloud::Dataplex::V1::StorageAccess] + # Output only. Identifies the access mechanism to the entity. Not user + # settable. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated unique ID for the Entity. This ID will be + # different if the Entity is deleted and re-created with the same name. + # @!attribute [rw] schema + # @return [::Google::Cloud::Dataplex::V1::Schema] + # Required. The description of the data structure and layout. + # The schema is not included in list responses. It is only included in + # `SCHEMA` and `FULL` entity views of a `GetEntity` response. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Provides compatibility information for various metadata stores. + # @!attribute [r] hive_metastore + # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] + # Output only. Whether this entity is compatible with Hive Metastore. + # @!attribute [r] bigquery + # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] + # Output only. Whether this entity is compatible with BigQuery. + class CompatibilityStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Provides compatibility information for a specific metadata store. + # @!attribute [r] compatible + # @return [::Boolean] + # Output only. Whether the entity is compatible and can be represented in + # the metadata store. + # @!attribute [r] reason + # @return [::String] + # Output only. Provides additional detail if the entity is incompatible + # with the metadata store. + class Compatibility + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The type of entity. + module Type + # Type unspecified. + TYPE_UNSPECIFIED = 0 + + # Structured and semi-structured data. + TABLE = 1 + + # Unstructured data. + FILESET = 2 + end + end + + # Represents partition metadata contained within entity instances. + # @!attribute [r] name + # @return [::String] + # Output only. Partition values used in the HTTP URL must be + # double encoded. For example, `url_encode(url_encode(value))` can be used + # to encode "US:CA/CA#Sunnyvale so that the request URL ends + # with "/partitions/US%253ACA/CA%2523Sunnyvale". + # The name field in the response retains the encoded format. + # @!attribute [rw] values + # @return [::Array<::String>] + # Required. Immutable. The set of values representing the partition, which + # correspond to the partition schema defined in the parent entity. + # @!attribute [rw] location + # @return [::String] + # Required. Immutable. The location of the entity data within the partition, + # for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or + # `projects//datasets//tables/` + # @!attribute [rw] etag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. The etag for this partition. + class Partition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Schema information describing the structure and layout of the data. + # @!attribute [rw] user_managed + # @return [::Boolean] + # Required. Set to `true` if user-managed or `false` if managed by Dataplex + # Universal Catalog. The default is `false` (managed by Dataplex Universal + # Catalog). + # + # - Set to `false`to enable Dataplex Universal Catalog discovery to update + # the schema. + # including new data discovery, schema inference, and schema evolution. + # Users retain the ability to input and edit the schema. Dataplex Universal + # Catalog treats schema input by the user as though produced by a previous + # Dataplex Universal Catalog discovery operation, and it will evolve the + # schema and take action based on that treatment. + # + # - Set to `true` to fully manage the entity + # schema. This setting guarantees that Dataplex Universal Catalog will not + # change schema fields. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] + # Optional. The sequence of fields describing data in table entities. + # **Note:** BigQuery SchemaFields are immutable. + # @!attribute [rw] partition_fields + # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::PartitionField>] + # Optional. The sequence of fields describing the partition structure in + # entities. If this field is empty, there are no partitions within the data. + # @!attribute [rw] partition_style + # @return [::Google::Cloud::Dataplex::V1::Schema::PartitionStyle] + # Optional. The structure of paths containing partition data within the + # entity. + class Schema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a column field within a table schema. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the field. Must contain only letters, numbers and + # underscores, with a maximum length of 767 characters, + # and must begin with a letter or underscore. + # @!attribute [rw] description + # @return [::String] + # Optional. User friendly field description. Must be less than or equal to + # 1024 characters. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Schema::Type] + # Required. The type of field. + # @!attribute [rw] mode + # @return [::Google::Cloud::Dataplex::V1::Schema::Mode] + # Required. Additional field semantics. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] + # Optional. Any nested field for complex types. + class SchemaField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a key field within the entity's partition structure. You could + # have up to 20 partition fields, but only the first 10 partitions have the + # filtering ability due to performance consideration. **Note:** + # Partition fields are immutable. + # @!attribute [rw] name + # @return [::String] + # Required. Partition field name must consist of letters, numbers, and + # underscores only, with a maximum of length of 256 characters, and must + # begin with a letter or underscore.. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Schema::Type] + # Required. Immutable. The type of field. + class PartitionField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type information for fields in schemas and partition schemas. + module Type + # SchemaType unspecified. + TYPE_UNSPECIFIED = 0 + + # Boolean field. + BOOLEAN = 1 + + # Single byte numeric field. + BYTE = 2 + + # 16-bit numeric field. + INT16 = 3 + + # 32-bit numeric field. + INT32 = 4 + + # 64-bit numeric field. + INT64 = 5 + + # Floating point numeric field. + FLOAT = 6 + + # Double precision numeric field. + DOUBLE = 7 + + # Real value numeric field. + DECIMAL = 8 + + # Sequence of characters field. + STRING = 9 + + # Sequence of bytes field. + BINARY = 10 + + # Date and time field. + TIMESTAMP = 11 + + # Date field. + DATE = 12 + + # Time field. + TIME = 13 + + # Structured field. Nested fields that define the structure of the map. + # If all nested fields are nullable, this field represents a union. + RECORD = 14 + + # Null field that does not have values. + NULL = 100 + end + + # Additional qualifiers to define field semantics. + module Mode + # Mode unspecified. + MODE_UNSPECIFIED = 0 + + # The field has required semantics. + REQUIRED = 1 + + # The field has optional semantics, and may be null. + NULLABLE = 2 + + # The field has repeated (0 or more) semantics, and is a list of values. + REPEATED = 3 + end + + # The structure of paths within the entity, which represent partitions. + module PartitionStyle + # PartitionStyle unspecified + PARTITION_STYLE_UNSPECIFIED = 0 + + # Partitions are hive-compatible. + # Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`, + # `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`. + HIVE_COMPATIBLE = 1 + end + end + + # Describes the format of the data within its storage location. + # @!attribute [r] format + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::Format] + # Output only. The data format associated with the stored data, which + # represents content type values. The value is inferred from mime type. + # @!attribute [rw] compression_format + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CompressionFormat] + # Optional. The compression type associated with the stored data. + # If unspecified, the data is uncompressed. + # @!attribute [rw] mime_type + # @return [::String] + # Required. The mime type descriptor for the data. Must match the pattern + # \\{type}/\\{subtype}. Supported values: + # + # - application/x-parquet + # - application/x-avro + # - application/x-orc + # - application/x-tfrecord + # - application/x-parquet+iceberg + # - application/x-avro+iceberg + # - application/x-orc+iceberg + # - application/json + # - application/\\{subtypes} + # - text/csv + # - text/ + # - image/\\{image subtype} + # - video/\\{video subtype} + # - audio/\\{audio subtype} + # @!attribute [rw] csv + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CsvOptions] + # Optional. Additional information about CSV formatted data. + # + # Note: The following fields are mutually exclusive: `csv`, `json`, `iceberg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] json + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::JsonOptions] + # Optional. Additional information about CSV formatted data. + # + # Note: The following fields are mutually exclusive: `json`, `csv`, `iceberg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] iceberg + # @return [::Google::Cloud::Dataplex::V1::StorageFormat::IcebergOptions] + # Optional. Additional information about iceberg tables. + # + # Note: The following fields are mutually exclusive: `iceberg`, `csv`, `json`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class StorageFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes CSV and similar semi-structured data formats. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. Accepts "US-ASCII", + # "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. Defaults to 0. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter used to separate values. Defaults to ','. + # @!attribute [rw] quote + # @return [::String] + # Optional. The character used to quote column values. Accepts '"' + # (double quotation mark) or ''' (single quotation mark). Defaults to + # '"' (double quotation mark) if unspecified. + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" + # and "ISO-8859-1". Defaults to UTF-8 if not specified. + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes Iceberg data format. + # @!attribute [rw] metadata_location + # @return [::String] + # Optional. The location of where the iceberg metadata is present, must be + # within the table path + class IcebergOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specific file format of the data. + module Format + # Format unspecified. + FORMAT_UNSPECIFIED = 0 + + # Parquet-formatted structured data. + PARQUET = 1 + + # Avro-formatted structured data. + AVRO = 2 + + # Orc-formatted structured data. + ORC = 3 + + # Csv-formatted semi-structured data. + CSV = 100 + + # Json-formatted semi-structured data. + JSON = 101 + + # Image data formats (such as jpg and png). + IMAGE = 200 + + # Audio data formats (such as mp3, and wav). + AUDIO = 201 + + # Video data formats (such as mp4 and mpg). + VIDEO = 202 + + # Textual data formats (such as txt and xml). + TEXT = 203 + + # TensorFlow record format. + TFRECORD = 204 + + # Data that doesn't match a specific format. + OTHER = 1000 + + # Data of an unknown format. + UNKNOWN = 1001 + end + + # The specific compressed file format of the data. + module CompressionFormat + # CompressionFormat unspecified. Implies uncompressed data. + COMPRESSION_FORMAT_UNSPECIFIED = 0 + + # GZip compressed set of files. + GZIP = 2 + + # BZip2 compressed set of files. + BZIP2 = 3 + end + end + + # Describes the access mechanism of the data within its storage location. + # @!attribute [r] read + # @return [::Google::Cloud::Dataplex::V1::StorageAccess::AccessMode] + # Output only. Describes the read access mechanism of the data. Not user + # settable. + class StorageAccess + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Access Mode determines how data stored within the Entity is read. + module AccessMode + # Access mode unspecified. + ACCESS_MODE_UNSPECIFIED = 0 + + # Default. Data is accessed directly using storage APIs. + DIRECT = 1 + + # Data is accessed through a managed interface using BigQuery APIs. + MANAGED = 2 + end + end + + # Identifies the cloud system that manages the data storage. + module StorageSystem + # Storage system unspecified. + STORAGE_SYSTEM_UNSPECIFIED = 0 + + # The entity data is contained within a Cloud Storage bucket. + CLOUD_STORAGE = 1 + + # The entity data is contained within a BigQuery dataset. + BIGQUERY = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb new file mode 100644 index 000000000000..2c082805a515 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb @@ -0,0 +1,137 @@ +# 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 + # DataScan scheduling and trigger settings. + # @!attribute [rw] on_demand + # @return [::Google::Cloud::Dataplex::V1::Trigger::OnDemand] + # The scan runs once via `RunDataScan` API. + # + # 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`, `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 + + # The scan runs once via `RunDataScan` API. + class OnDemand + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The scan is scheduled to run periodically. + # @!attribute [rw] cron + # @return [::String] + # Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running + # scans periodically. + # + # To explicitly set a timezone in the cron tab, apply a prefix in the + # cron tab: **"CRON_TZ=$\\{IANA_TIME_ZONE}"** or **"TZ=$\\{IANA_TIME_ZONE}"**. + # The **$\\{IANA_TIME_ZONE}** may only be a valid string from IANA time zone + # database + # ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). + # For example, `CRON_TZ=America/New_York 1 * * * *`, or + # `TZ=America/New_York 1 * * * *`. + # + # This field is required for Schedule scans. + class Schedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. + # @!attribute [rw] entity + # @return [::String] + # Immutable. The Dataplex Universal Catalog entity that represents the data + # source (e.g. BigQuery table) for DataScan, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + # + # Note: The following fields are mutually exclusive: `entity`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource + # @return [::String] + # Immutable. The service-qualified full resource name of the cloud resource + # for a DataScan job to scan against. The field could either be: Cloud + # Storage bucket for DataDiscoveryScan Format: + # //storage.googleapis.com/projects/PROJECT_ID/buckets/BUCKET_ID + # or + # BigQuery table of type "TABLE" for + # DataProfileScan/DataQualityScan/DataDocumentationScan Format: + # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + # + # Note: The following fields are mutually exclusive: `resource`, `entity`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data scanned during processing (e.g. in incremental DataScan) + # @!attribute [rw] incremental_field + # @return [::Google::Cloud::Dataplex::V1::ScannedData::IncrementalField] + # The range denoted by values of an incremental field + class ScannedData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A data range denoted by a pair of start/end values of a field. + # @!attribute [r] field + # @return [::String] + # Output only. The field that contains values which monotonically increases + # over time (e.g. a timestamp column). + # @!attribute [r] start + # @return [::String] + # Output only. Value that marks the start of the range. + # @!attribute [r] end + # @return [::String] + # Output only. Value that marks the end of the range. + class IncrementalField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb new file mode 100644 index 000000000000..c2a619b26687 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb @@ -0,0 +1,858 @@ +# 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 lake is a centralized repository for managing enterprise data across the + # organization distributed across many cloud projects, and stored in a variety + # of storage services such as Google Cloud Storage and BigQuery. The resources + # attached to a lake are referred to as managed resources. Data within these + # managed resources can be structured or unstructured. A lake provides data + # admins with tools to organize, secure and manage their data at scale, and + # provides data scientists and data engineers an integrated experience to + # easily search, discover, analyze and transform data and associated metadata. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the lake, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the lake. This ID will + # be different if the lake is deleted and re-created with the same name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the lake was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the lake was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the lake. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the lake. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the lake. + # @!attribute [r] service_account + # @return [::String] + # Output only. Service account associated with this lake. This service + # account must be authorized to access or operate on resources managed by the + # lake. + # @!attribute [rw] metastore + # @return [::Google::Cloud::Dataplex::V1::Lake::Metastore] + # Optional. Settings to manage lake and Dataproc Metastore service instance + # association. + # @!attribute [r] asset_status + # @return [::Google::Cloud::Dataplex::V1::AssetStatus] + # Output only. Aggregated status of the underlying assets of the lake. + # @!attribute [r] metastore_status + # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus] + # Output only. Metastore status of the lake. + class Lake + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings to manage association of Dataproc Metastore with a lake. + # @!attribute [rw] service + # @return [::String] + # Optional. A relative reference to the Dataproc Metastore + # (https://cloud.google.com/dataproc-metastore/docs) service associated + # with the lake: + # `projects/{project_id}/locations/{location_id}/services/{service_id}` + class Metastore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of Lake and Dataproc Metastore service instance association. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus::State] + # Current state of association. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current status. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the metastore status of the lake. + # @!attribute [rw] endpoint + # @return [::String] + # The URI of the endpoint used to access the Metastore service. + class MetastoreStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Current state of association. + module State + # Unspecified. + STATE_UNSPECIFIED = 0 + + # A Metastore service instance is not associated with the lake. + NONE = 1 + + # A Metastore service instance is attached to the lake. + READY = 2 + + # Attach/detach is in progress. + UPDATING = 3 + + # Attach/detach could not be done due to errors. + ERROR = 4 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Aggregated status of the underlying assets of a lake or zone. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + # @!attribute [rw] active_assets + # @return [::Integer] + # Number of active assets. + # @!attribute [rw] security_policy_applying_assets + # @return [::Integer] + # Number of assets that are in process of updating the security policy on + # attached resources. + class AssetStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A zone represents a logical group of related assets within a lake. A zone can + # be used to map to organizational structure or represent stages of data + # readiness from raw to curated. It provides managing behavior that is shared + # or inherited by all contained assets. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the zone, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the zone. This ID will + # be different if the zone is deleted and re-created with the same name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the zone was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the zone was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the zone. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the zone. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the zone. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Zone::Type] + # Required. Immutable. The type of the zone. + # @!attribute [rw] discovery_spec + # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec] + # Optional. Specification of the discovery feature applied to data in this + # zone. + # @!attribute [rw] resource_spec + # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec] + # Required. Specification of the resources that are referenced by the assets + # within this zone. + # @!attribute [r] asset_status + # @return [::Google::Cloud::Dataplex::V1::AssetStatus] + # Output only. Aggregated status of the underlying assets of the zone. + class Zone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Settings for resources attached as assets within a zone. + # @!attribute [rw] location_type + # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec::LocationType] + # Required. Immutable. The location type of the resources that are allowed + # to be attached to the assets within this zone. + class ResourceSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Location type of the resources attached to a zone. + module LocationType + # Unspecified location type. + LOCATION_TYPE_UNSPECIFIED = 0 + + # Resources that are associated with a single region. + SINGLE_REGION = 1 + + # Resources that are associated with a multi-region location. + MULTI_REGION = 2 + end + end + + # Settings to manage the metadata discovery and publishing in a zone. + # @!attribute [rw] enabled + # @return [::Boolean] + # Required. Whether discovery is enabled. + # @!attribute [rw] include_patterns + # @return [::Array<::String>] + # Optional. The list of patterns to apply for selecting data to include + # during discovery if only a subset of the data should considered. For + # Cloud Storage bucket assets, these are interpreted as glob patterns used + # to match object names. For BigQuery dataset assets, these are interpreted + # as patterns to match table names. + # @!attribute [rw] exclude_patterns + # @return [::Array<::String>] + # Optional. The list of patterns to apply for selecting data to exclude + # during discovery. For Cloud Storage bucket assets, these are interpreted + # as glob patterns used to match object names. For BigQuery dataset assets, + # these are interpreted as patterns to match table names. + # @!attribute [rw] csv_options + # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::CsvOptions] + # Optional. Configuration for CSV data. + # @!attribute [rw] json_options + # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::JsonOptions] + # Optional. Configuration for Json data. + # @!attribute [rw] schedule + # @return [::String] + # Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + # running discovery periodically. Successive discovery runs must be + # scheduled at least 60 minutes apart. The default value is to run + # discovery every 60 minutes. + # + # To explicitly set a timezone to the cron tab, apply a prefix in the + # cron tab: "CRON_TZ=$\\{IANA_TIME_ZONE}" or TZ=$\\{IANA_TIME_ZONE}". + # The $\\{IANA_TIME_ZONE} may only be a valid string from IANA time zone + # database. For example, `CRON_TZ=America/New_York 1 * * * *`, or + # `TZ=America/New_York 1 * * * *`. + class DiscoverySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describe CSV and similar semi-structured data formats. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter being used to separate values. This defaults to + # ','. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # Optional. Whether to disable the inference of data type for CSV data. + # If true, all columns will be registered as strings. + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describe JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # Optional. Whether to disable the inference of data type for Json data. + # If true, all columns will be registered as their primitive types + # (strings, number or boolean). + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of zone. + module Type + # Zone type not specified. + TYPE_UNSPECIFIED = 0 + + # A zone that contains data that needs further processing before it is + # considered generally ready for consumption and analytics workloads. + RAW = 1 + + # A zone that contains data that is considered to be ready for broader + # consumption and analytics workloads. Curated structured data stored in + # Cloud Storage must conform to certain file formats (parquet, avro and + # orc) and organized in a hive-compatible directory layout. + CURATED = 2 + end + end + + # Action represents an issue requiring administrator action for resolution. + # @!attribute [rw] category + # @return [::Google::Cloud::Dataplex::V1::Action::Category] + # The category of issue associated with the action. + # @!attribute [rw] issue + # @return [::String] + # Detailed description of the issue requiring action. + # @!attribute [rw] detect_time + # @return [::Google::Protobuf::Timestamp] + # The time that the issue was detected. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the action, of the form: + # `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` + # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. + # @!attribute [r] lake + # @return [::String] + # Output only. The relative resource name of the lake, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [r] zone + # @return [::String] + # Output only. The relative resource name of the zone, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [r] asset + # @return [::String] + # Output only. The relative resource name of the asset, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @!attribute [rw] data_locations + # @return [::Array<::String>] + # The list of data locations associated with this action. Cloud Storage + # locations are represented as URI paths(E.g. + # `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to + # resource names(E.g. + # `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). + # @!attribute [rw] invalid_data_format + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataFormat] + # Details for issues related to invalid or unsupported data formats. + # + # Note: The following fields are mutually exclusive: `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] incompatible_data_schema + # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema] + # Details for issues related to incompatible schemas detected within data. + # + # Note: The following fields are mutually exclusive: `incompatible_data_schema`, `invalid_data_format`, `invalid_data_partition`, `missing_data`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] invalid_data_partition + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition] + # Details for issues related to invalid or unsupported data partition + # structure. + # + # Note: The following fields are mutually exclusive: `invalid_data_partition`, `invalid_data_format`, `incompatible_data_schema`, `missing_data`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] missing_data + # @return [::Google::Cloud::Dataplex::V1::Action::MissingData] + # Details for issues related to absence of data within managed resources. + # + # Note: The following fields are mutually exclusive: `missing_data`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] missing_resource + # @return [::Google::Cloud::Dataplex::V1::Action::MissingResource] + # Details for issues related to absence of a managed resource. + # + # Note: The following fields are mutually exclusive: `missing_resource`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] unauthorized_resource + # @return [::Google::Cloud::Dataplex::V1::Action::UnauthorizedResource] + # Details for issues related to lack of permissions to access data + # resources. + # + # Note: The following fields are mutually exclusive: `unauthorized_resource`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `missing_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] failed_security_policy_apply + # @return [::Google::Cloud::Dataplex::V1::Action::FailedSecurityPolicyApply] + # Details for issues related to applying security policy. + # + # Note: The following fields are mutually exclusive: `failed_security_policy_apply`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `missing_resource`, `unauthorized_resource`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] invalid_data_organization + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataOrganization] + # Details for issues related to invalid data arrangement. + # + # Note: The following fields are mutually exclusive: `invalid_data_organization`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Action + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Action details for resource references in assets that cannot be located. + class MissingResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for unauthorized resource issues raised to indicate that the + # service account associated with the lake instance is not authorized to + # access or manage the resource associated with an asset. + class UnauthorizedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Failed to apply security policy to the managed resource(s) under a + # lake, zone or an asset. For a lake or zone resource, one or more underlying + # assets has a failure applying security policy to the associated managed + # resource. + # @!attribute [rw] asset + # @return [::String] + # Resource name of one of the assets with failing security policy + # application. Populated for a lake or zone resource only. + class FailedSecurityPolicyApply + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for invalid or unsupported data files detected by discovery. + # @!attribute [rw] sampled_data_locations + # @return [::Array<::String>] + # The list of data locations sampled and used for format/schema + # inference. + # @!attribute [rw] expected_format + # @return [::String] + # The expected data format of the entity. + # @!attribute [rw] new_format + # @return [::String] + # The new unexpected data format within the entity. + class InvalidDataFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for incompatible schemas detected by discovery. + # @!attribute [rw] table + # @return [::String] + # The name of the table containing invalid data. + # @!attribute [rw] existing_schema + # @return [::String] + # The existing and expected schema of the table. The schema is provided as + # a JSON formatted structure listing columns and data types. + # @!attribute [rw] new_schema + # @return [::String] + # The new and incompatible schema within the table. The schema is provided + # as a JSON formatted structured listing columns and data types. + # @!attribute [rw] sampled_data_locations + # @return [::Array<::String>] + # The list of data locations sampled and used for format/schema + # inference. + # @!attribute [rw] schema_change + # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema::SchemaChange] + # Whether the action relates to a schema that is incompatible or modified. + class IncompatibleDataSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Whether the action relates to a schema that is incompatible or modified. + module SchemaChange + # Schema change unspecified. + SCHEMA_CHANGE_UNSPECIFIED = 0 + + # Newly discovered schema is incompatible with existing schema. + INCOMPATIBLE = 1 + + # Newly discovered schema has changed from existing schema for data in a + # curated zone. + MODIFIED = 2 + end + end + + # Action details for invalid or unsupported partitions detected by discovery. + # @!attribute [rw] expected_structure + # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition::PartitionStructure] + # The issue type of InvalidDataPartition. + class InvalidDataPartition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The expected partition structure. + module PartitionStructure + # PartitionStructure unspecified. + PARTITION_STRUCTURE_UNSPECIFIED = 0 + + # Consistent hive-style partition definition (both raw and curated zone). + CONSISTENT_KEYS = 1 + + # Hive style partition definition (curated zone only). + HIVE_STYLE_KEYS = 2 + end + end + + # Action details for absence of data detected by discovery. + class MissingData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action details for invalid data arrangement. + class InvalidDataOrganization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The category of issues. + module Category + # Unspecified category. + CATEGORY_UNSPECIFIED = 0 + + # Resource management related issues. + RESOURCE_MANAGEMENT = 1 + + # Security policy related issues. + SECURITY_POLICY = 2 + + # Data and discovery related issues. + DATA_DISCOVERY = 3 + end + end + + # An asset represents a cloud resource that is being managed within a lake as a + # member of a zone. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the asset, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the asset. This ID + # will be different if the asset is deleted and re-created with the same + # name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the asset was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the asset was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User defined labels for the asset. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the asset. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the asset. + # @!attribute [rw] resource_spec + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec] + # Required. Specification of the resource that is referenced by this asset. + # @!attribute [r] resource_status + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus] + # Output only. Status of the resource referenced by this asset. + # @!attribute [r] security_status + # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus] + # Output only. Status of the security policy applied to resource referenced + # by this asset. + # @!attribute [rw] discovery_spec + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec] + # Optional. Specification of the discovery feature applied to data referenced + # by this asset. When this spec is left unset, the asset will use the spec + # set on the parent zone. + # @!attribute [r] discovery_status + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus] + # Output only. Status of the discovery feature applied to data referenced by + # this asset. + class Asset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Security policy status of the asset. Data security policy, i.e., readers, + # writers & owners, should be specified in the lake/zone/asset IAM policy. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus::State] + # The current state of the security policy applied to the attached + # resource. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current state. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + class SecurityStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the security policy. + module State + # State unspecified. + STATE_UNSPECIFIED = 0 + + # Security policy has been successfully applied to the attached resource. + READY = 1 + + # Security policy is in the process of being applied to the attached + # resource. + APPLYING = 2 + + # Security policy could not be applied to the attached resource due to + # errors. + ERROR = 3 + end + end + + # Settings to manage the metadata discovery and publishing for an asset. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Whether discovery is enabled. + # @!attribute [rw] include_patterns + # @return [::Array<::String>] + # Optional. The list of patterns to apply for selecting data to include + # during discovery if only a subset of the data should considered. For + # Cloud Storage bucket assets, these are interpreted as glob patterns used + # to match object names. For BigQuery dataset assets, these are interpreted + # as patterns to match table names. + # @!attribute [rw] exclude_patterns + # @return [::Array<::String>] + # Optional. The list of patterns to apply for selecting data to exclude + # during discovery. For Cloud Storage bucket assets, these are interpreted + # as glob patterns used to match object names. For BigQuery dataset assets, + # these are interpreted as patterns to match table names. + # @!attribute [rw] csv_options + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::CsvOptions] + # Optional. Configuration for CSV data. + # @!attribute [rw] json_options + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::JsonOptions] + # Optional. Configuration for Json data. + # @!attribute [rw] schedule + # @return [::String] + # Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + # running discovery periodically. Successive discovery runs must be + # scheduled at least 60 minutes apart. The default value is to run + # discovery every 60 minutes. + # + # To explicitly set a timezone to the cron tab, apply a prefix in the + # cron tab: "CRON_TZ=$\\{IANA_TIME_ZONE}" or TZ=$\\{IANA_TIME_ZONE}". + # The $\\{IANA_TIME_ZONE} may only be a valid string from IANA time zone + # database. For example, `CRON_TZ=America/New_York 1 * * * *`, or + # `TZ=America/New_York 1 * * * *`. + class DiscoverySpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describe CSV and similar semi-structured data formats. + # @!attribute [rw] header_rows + # @return [::Integer] + # Optional. The number of rows to interpret as header rows that should be + # skipped when reading data rows. + # @!attribute [rw] delimiter + # @return [::String] + # Optional. The delimiter being used to separate values. This defaults to + # ','. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # Optional. Whether to disable the inference of data type for CSV data. + # If true, all columns will be registered as strings. + class CsvOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describe JSON data format. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The character encoding of the data. The default is UTF-8. + # @!attribute [rw] disable_type_inference + # @return [::Boolean] + # Optional. Whether to disable the inference of data type for Json data. + # If true, all columns will be registered as their primitive types + # (strings, number or boolean). + class JsonOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Identifies the cloud resource that is referenced by this asset. + # @!attribute [rw] name + # @return [::String] + # Immutable. Relative name of the cloud resource that contains the data + # that is being managed within a lake. For example: + # `projects/{project_number}/buckets/{bucket_id}` + # `projects/{project_number}/datasets/{dataset_id}` + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::Type] + # Required. Immutable. Type of resource. + # @!attribute [rw] read_access_mode + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::AccessMode] + # Optional. Determines how read permissions are handled for each asset and + # their associated tables. Only available to storage buckets assets. + class ResourceSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of resource. + module Type + # Type not specified. + TYPE_UNSPECIFIED = 0 + + # Cloud Storage bucket. + STORAGE_BUCKET = 1 + + # BigQuery dataset. + BIGQUERY_DATASET = 2 + end + + # Access Mode determines how data stored within the resource is read. This + # is only applicable to storage bucket assets. + module AccessMode + # Access mode unspecified. + ACCESS_MODE_UNSPECIFIED = 0 + + # Default. Data is accessed directly using storage APIs. + DIRECT = 1 + + # Data is accessed through a managed interface using BigQuery APIs. + MANAGED = 2 + end + end + + # Status of the resource referenced by an asset. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus::State] + # The current state of the managed resource. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current state. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + # @!attribute [r] managed_access_identity + # @return [::String] + # Output only. Service account associated with the BigQuery Connection. + class ResourceStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of a resource. + module State + # State unspecified. + STATE_UNSPECIFIED = 0 + + # Resource does not have any errors. + READY = 1 + + # Resource has errors. + ERROR = 2 + end + end + + # Status of discovery for an asset. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::State] + # The current status of the discovery feature. + # @!attribute [rw] message + # @return [::String] + # Additional information about the current state. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Last update time of the status. + # @!attribute [rw] last_run_time + # @return [::Google::Protobuf::Timestamp] + # The start time of the last discovery run. + # @!attribute [rw] stats + # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::Stats] + # Data Stats of the asset reported by discovery. + # @!attribute [rw] last_run_duration + # @return [::Google::Protobuf::Duration] + # The duration of the last discovery run. + class DiscoveryStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The aggregated data statistics for the asset reported by discovery. + # @!attribute [rw] data_items + # @return [::Integer] + # The count of data items within the referenced resource. + # @!attribute [rw] data_size + # @return [::Integer] + # The number of stored data bytes within the referenced resource. + # @!attribute [rw] tables + # @return [::Integer] + # The count of table entities within the referenced resource. + # @!attribute [rw] filesets + # @return [::Integer] + # The count of fileset entities within the referenced resource. + class Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Current state of discovery. + module State + # State is unspecified. + STATE_UNSPECIFIED = 0 + + # Discovery for the asset is scheduled. + SCHEDULED = 1 + + # Discovery for the asset is running. + IN_PROGRESS = 2 + + # Discovery for the asset is currently paused (e.g. due to a lack + # of available resources). It will be automatically resumed. + PAUSED = 3 + + # Discovery for the asset is disabled. + DISABLED = 5 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # State of a resource. + module State + # State is not specified. + STATE_UNSPECIFIED = 0 + + # Resource is active, i.e., ready to use. + ACTIVE = 1 + + # Resource is under creation. + CREATING = 2 + + # Resource is under deletion. + DELETING = 3 + + # Resource is active but has unresolved actions. + ACTION_REQUIRED = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb new file mode 100644 index 000000000000..dcf73dffbd3d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 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 + # ResourceAccessSpec holds the access control configuration to be enforced + # on the resources, for example, Cloud Storage bucket, BigQuery dataset, + # BigQuery table. + # @!attribute [rw] readers + # @return [::Array<::String>] + # Optional. The format of strings follows the pattern followed by IAM in the + # bindings. user:\\{email}, serviceAccount:\\{email} group:\\{email}. + # The set of principals to be granted reader role on the resource. + # @!attribute [rw] writers + # @return [::Array<::String>] + # Optional. The set of principals to be granted writer role on the resource. + # @!attribute [rw] owners + # @return [::Array<::String>] + # Optional. The set of principals to be granted owner role on the resource. + class ResourceAccessSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataAccessSpec holds the access control configuration to be enforced on data + # stored within resources (eg: rows, columns in BigQuery Tables). When + # associated with data, the data is only accessible to + # principals explicitly granted access through the DataAccessSpec. Principals + # with access to the containing resource are not implicitly granted access. + # @!attribute [rw] readers + # @return [::Array<::String>] + # Optional. The format of strings follows the pattern followed by IAM in the + # bindings. user:\\{email}, serviceAccount:\\{email} group:\\{email}. + # The set of principals to be granted reader role on data + # stored within resources. + class DataAccessSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb new file mode 100644 index 000000000000..5fb2058b462a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb @@ -0,0 +1,655 @@ +# 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 + # Create lake request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the lake location, of the form: + # projects/\\{project_number}/locations/\\{location_id} + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] lake_id + # @return [::String] + # Required. Lake identifier. + # This ID will be used to generate names such as database and dataset names + # when publishing metadata to Hive Metastore and BigQuery. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique within the customer project / location. + # @!attribute [rw] lake + # @return [::Google::Cloud::Dataplex::V1::Lake] + # Required. Lake resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update lake request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] lake + # @return [::Google::Cloud::Dataplex::V1::Lake] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete lake request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + class DeleteLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List lakes request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the lake location, of the form: + # `projects/{project_number}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of Lakes to return. The service may return fewer + # than this value. If unspecified, at most 10 lakes will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListLakes` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListLakes` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListLakesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List lakes response. + # @!attribute [rw] lakes + # @return [::Array<::Google::Cloud::Dataplex::V1::Lake>] + # Lakes under the given parent location. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListLakesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List lake actions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of actions to return. The service may return fewer + # than this value. If unspecified, at most 10 actions will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListLakeActions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListLakeActions` must match the call that provided + # the page token. + class ListLakeActionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List actions response. + # @!attribute [rw] actions + # @return [::Array<::Google::Cloud::Dataplex::V1::Action>] + # Actions under the given parent lake/zone/asset. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListActionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get lake request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + class GetLakeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create zone request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] zone_id + # @return [::String] + # Required. Zone identifier. + # This ID will be used to generate names such as database and dataset names + # when publishing metadata to Hive Metastore and BigQuery. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique across all lakes from all locations in a project. + # * Must not be one of the reserved IDs (i.e. "default", "global-temp") + # @!attribute [rw] zone + # @return [::Google::Cloud::Dataplex::V1::Zone] + # Required. Zone resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update zone request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] zone + # @return [::Google::Cloud::Dataplex::V1::Zone] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete zone request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + class DeleteZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List zones request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of zones to return. The service may return fewer + # than this value. If unspecified, at most 10 zones will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListZones` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListZones` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListZonesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List zones response. + # @!attribute [rw] zones + # @return [::Array<::Google::Cloud::Dataplex::V1::Zone>] + # Zones under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListZonesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List zone actions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of actions to return. The service may return fewer + # than this value. If unspecified, at most 10 actions will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListZoneActions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListZoneActions` must match the call that provided + # the page token. + class ListZoneActionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get zone request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + class GetZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create asset request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] asset_id + # @return [::String] + # Required. Asset identifier. + # This ID will be used to generate names such as table names when publishing + # metadata to Hive Metastore and BigQuery. + # * Must contain only lowercase letters, numbers and hyphens. + # * Must start with a letter. + # * Must end with a number or a letter. + # * Must be between 1-63 characters. + # * Must be unique within the zone. + # @!attribute [rw] asset + # @return [::Google::Cloud::Dataplex::V1::Asset] + # Required. Asset resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update asset request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] asset + # @return [::Google::Cloud::Dataplex::V1::Asset] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete asset request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + class DeleteAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List assets request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent zone: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of asset to return. The service may return fewer + # than this value. If unspecified, at most 10 assets will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListAssets` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListAssets` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List assets response. + # @!attribute [rw] assets + # @return [::Array<::Google::Cloud::Dataplex::V1::Asset>] + # Asset under the given parent zone. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List asset actions request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of actions to return. The service may return fewer + # than this value. If unspecified, at most 10 actions will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListAssetActions` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListAssetActions` must match the call that provided + # the page token. + class ListAssetActionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get asset request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the asset: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. + class GetAssetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of a long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Create task request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] task_id + # @return [::String] + # Required. Task identifier. + # @!attribute [rw] task + # @return [::Google::Cloud::Dataplex::V1::Task] + # Required. Task resource. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class CreateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Update task request. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] task + # @return [::Google::Cloud::Dataplex::V1::Task] + # Required. Update description. + # Only fields specified in `update_mask` are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. Only validate the request, but do not perform mutations. + # The default is false. + class UpdateTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Delete task request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. + class DeleteTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List tasks request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent lake: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of tasks to return. The service may return fewer + # than this value. If unspecified, at most 10 tasks will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListZones` call. Provide + # this to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListZones` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter request. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Order by fields for the result. + class ListTasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List tasks response. + # @!attribute [rw] tasks + # @return [::Array<::Google::Cloud::Dataplex::V1::Task>] + # Tasks under the given parent lake. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable_locations + # @return [::Array<::String>] + # Locations that could not be reached. + class ListTasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get task request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. + class GetTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Get job request. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + class GetJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the task: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the task. If the map is left empty, the + # task will run with existing labels from task definition. If the map + # contains an entry with a new key, the same will be added to existing set of + # labels. If the map contains an entry with an existing label key in task + # definition, the task will run with new label value for that entry. Clearing + # an existing label will require label value to be explicitly set to a hyphen + # "-". The label value cannot be empty. + # @!attribute [rw] args + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Execution spec arguments. If the map is left empty, the task will + # run with existing execution spec args from task definition. If the map + # contains an entry with a new key, the same will be added to existing set of + # args. If the map contains an entry with an existing arg key in task + # definition, the task will run with new arg value for that entry. Clearing + # an existing arg will require arg value to be explicitly set to a hyphen + # "-". The arg value cannot be empty. + class RunTaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ArgsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] job + # @return [::Google::Cloud::Dataplex::V1::Job] + # Jobs created by RunTask API. + class RunTaskResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List jobs request. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent environment: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of jobs to return. The service may return fewer + # than this value. If unspecified, at most 10 jobs will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `ListJobs` call. Provide this + # to retrieve the subsequent page. When paginating, all other parameters + # provided to `ListJobs` must match the call that provided the page + # token. + class ListJobsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List jobs response. + # @!attribute [rw] jobs + # @return [::Array<::Google::Cloud::Dataplex::V1::Job>] + # Jobs under a given task. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + class ListJobsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cancel task jobs. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the job: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. + class CancelJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb new file mode 100644 index 000000000000..c59483351f40 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb @@ -0,0 +1,452 @@ +# 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 task represents a user-visible job. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the task, of the form: + # projects/\\{project_number}/locations/\\{location_id}/lakes/\\{lake_id}/ + # tasks/\\{task_id}. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the task. This ID will + # be different if the task is deleted and re-created with the same name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the task was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the task was last updated. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the task. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::State] + # Output only. Current state of the task. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined labels for the task. + # @!attribute [rw] trigger_spec + # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec] + # Required. Spec related to how often and when a task should be triggered. + # @!attribute [rw] execution_spec + # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] + # Required. Spec related to how a task is executed. + # @!attribute [r] execution_status + # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionStatus] + # Output only. Status of the latest task executions. + # @!attribute [rw] spark + # @return [::Google::Cloud::Dataplex::V1::Task::SparkTaskConfig] + # Config related to running custom Spark tasks. + # + # Note: The following fields are mutually exclusive: `spark`, `notebook`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] notebook + # @return [::Google::Cloud::Dataplex::V1::Task::NotebookTaskConfig] + # Config related to running scheduled Notebooks. + # + # Note: The following fields are mutually exclusive: `notebook`, `spark`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Task + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for the underlying infrastructure used to run workloads. + # @!attribute [rw] batch + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::BatchComputeResources] + # Compute resources needed for a Task when using Dataproc Serverless. + # @!attribute [rw] container_image + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::ContainerImageRuntime] + # Container Image Runtime Configuration. + # @!attribute [rw] vpc_network + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::VpcNetwork] + # Vpc network. + class InfrastructureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Batch compute resources associated with the task. + # @!attribute [rw] executors_count + # @return [::Integer] + # Optional. Total number of job executors. + # Executor Count should be between 2 and 100. [Default=2] + # @!attribute [rw] max_executors_count + # @return [::Integer] + # Optional. Max configurable executors. + # If max_executors_count > executors_count, then auto-scaling is enabled. + # Max Executor Count should be between 2 and 1000. [Default=1000] + class BatchComputeResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container Image Runtime Configuration used with Batch execution. + # @!attribute [rw] image + # @return [::String] + # Optional. Container image to use. + # @!attribute [rw] java_jars + # @return [::Array<::String>] + # Optional. A list of Java JARS to add to the classpath. + # Valid input includes Cloud Storage URIs to Jar binaries. + # For example, gs://bucket-name/my/path/to/file.jar + # @!attribute [rw] python_packages + # @return [::Array<::String>] + # Optional. A list of python packages to be installed. + # Valid formats include Cloud Storage URI to a PIP installable library. + # For example, gs://bucket-name/my/path/to/lib.tar.gz + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Override to common configuration of open source components + # installed on the Dataproc cluster. The properties to set on daemon + # config files. Property keys are specified in `prefix:property` format, + # for example `core:hadoop.tmp.dir`. For more information, see [Cluster + # properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). + class ContainerImageRuntime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Cloud VPC Network used to run the infrastructure. + # @!attribute [rw] network + # @return [::String] + # Optional. The Cloud VPC network in which the job is run. By default, + # the Cloud VPC network named Default within the project is used. + # + # Note: The following fields are mutually exclusive: `network`, `sub_network`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sub_network + # @return [::String] + # Optional. The Cloud VPC sub-network in which the job is run. + # + # Note: The following fields are mutually exclusive: `sub_network`, `network`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] network_tags + # @return [::Array<::String>] + # Optional. List of network tags to apply to the job. + class VpcNetwork + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Task scheduling and trigger settings. + # @!attribute [rw] type + # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec::Type] + # Required. Immutable. Trigger type of the user-specified Task. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The first run of the task will be after this time. + # If not specified, the task will run shortly after being submitted if + # ON_DEMAND and based on the schedule if RECURRING. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Prevent the task from executing. + # This does not cancel already running tasks. It is intended to temporarily + # disable RECURRING tasks. + # @!attribute [rw] max_retries + # @return [::Integer] + # Optional. Number of retry attempts before aborting. + # Set to zero to never attempt to retry a failed task. + # @!attribute [rw] schedule + # @return [::String] + # Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for + # running tasks periodically. To explicitly set a timezone to the cron + # tab, apply a prefix in the cron tab: "CRON_TZ=$\\{IANA_TIME_ZONE}" or + # "TZ=$\\{IANA_TIME_ZONE}". The $\\{IANA_TIME_ZONE} may only be a valid + # string from IANA time zone database. For example, + # `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * + # *`. This field is required for RECURRING tasks. + class TriggerSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Determines how often and when the job will run. + module Type + # Unspecified trigger type. + TYPE_UNSPECIFIED = 0 + + # The task runs one-time shortly after Task Creation. + ON_DEMAND = 1 + + # The task is scheduled to run periodically. + RECURRING = 2 + end + end + + # Execution related settings, like retry and service_account. + # @!attribute [rw] args + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The arguments to pass to the task. + # The args can use placeholders of the format $\\{placeholder} as + # part of key/value string. These will be interpolated before passing the + # args to the driver. Currently supported placeholders: + # - $\\{task_id} + # - $\\{job_time} + # To pass positional args, set the key as TASK_ARGS. The value should be a + # comma-separated string of all the positional arguments. To use a + # delimiter other than comma, refer to + # https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of + # other keys being present in the args, then TASK_ARGS will be passed as + # the last argument. + # @!attribute [rw] service_account + # @return [::String] + # Required. Service account to use to execute a task. + # If not provided, the default Compute service account for the project is + # used. + # @!attribute [rw] project + # @return [::String] + # Optional. The project in which jobs are run. By default, the project + # containing the Lake is used. If a project is provided, the + # {::Google::Cloud::Dataplex::V1::Task::ExecutionSpec#service_account ExecutionSpec.service_account} + # must belong to this project. + # @!attribute [rw] max_job_execution_lifetime + # @return [::Google::Protobuf::Duration] + # Optional. The maximum duration after which the job execution is expired. + # @!attribute [rw] kms_key + # @return [::String] + # Optional. The Cloud KMS key to use for encryption, of the form: + # `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. + class ExecutionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ArgsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # User-specified config for running a Spark task. + # @!attribute [rw] main_jar_file_uri + # @return [::String] + # The Cloud Storage URI of the jar file that contains the main class. + # The execution args are passed in as a sequence of named process + # arguments (`--key=value`). + # + # Note: The following fields are mutually exclusive: `main_jar_file_uri`, `main_class`, `python_script_file`, `sql_script_file`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] main_class + # @return [::String] + # The name of the driver's main class. The jar file that contains the + # class must be in the default CLASSPATH or specified in + # `jar_file_uris`. + # The execution args are passed in as a sequence of named process + # arguments (`--key=value`). + # + # Note: The following fields are mutually exclusive: `main_class`, `main_jar_file_uri`, `python_script_file`, `sql_script_file`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] python_script_file + # @return [::String] + # The Gcloud Storage URI of the main Python file to use as the driver. + # Must be a .py file. The execution args are passed in as a sequence of + # named process arguments (`--key=value`). + # + # Note: The following fields are mutually exclusive: `python_script_file`, `main_jar_file_uri`, `main_class`, `sql_script_file`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sql_script_file + # @return [::String] + # A reference to a query file. This should be the Cloud Storage URI of + # the query file. The execution args are used to declare a set of script + # variables (`set key="value";`). + # + # Note: The following fields are mutually exclusive: `sql_script_file`, `main_jar_file_uri`, `main_class`, `python_script_file`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sql_script + # @return [::String] + # The query text. + # The execution args are used to declare a set of script variables + # (`set key="value";`). + # + # Note: The following fields are mutually exclusive: `sql_script`, `main_jar_file_uri`, `main_class`, `python_script_file`, `sql_script_file`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] file_uris + # @return [::Array<::String>] + # Optional. Cloud Storage URIs of files to be placed in the working + # directory of each executor. + # @!attribute [rw] archive_uris + # @return [::Array<::String>] + # Optional. Cloud Storage URIs of archives to be extracted into the working + # directory of each executor. Supported file types: .jar, .tar, .tar.gz, + # .tgz, and .zip. + # @!attribute [rw] infrastructure_spec + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] + # Optional. Infrastructure specification for the execution. + class SparkTaskConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config for running scheduled notebooks. + # @!attribute [rw] notebook + # @return [::String] + # Required. Path to input notebook. This can be the Cloud Storage URI of + # the notebook file or the path to a Notebook Content. The execution args + # are accessible as environment variables + # (`TASK_key=value`). + # @!attribute [rw] infrastructure_spec + # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] + # Optional. Infrastructure specification for the execution. + # @!attribute [rw] file_uris + # @return [::Array<::String>] + # Optional. Cloud Storage URIs of files to be placed in the working + # directory of each executor. + # @!attribute [rw] archive_uris + # @return [::Array<::String>] + # Optional. Cloud Storage URIs of archives to be extracted into the working + # directory of each executor. Supported file types: .jar, .tar, .tar.gz, + # .tgz, and .zip. + class NotebookTaskConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of the task execution (e.g. Jobs). + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update time of the status. + # @!attribute [r] latest_job + # @return [::Google::Cloud::Dataplex::V1::Job] + # Output only. latest job execution + class ExecutionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A job represents an instance of a task. + # @!attribute [r] name + # @return [::String] + # Output only. The relative resource name of the job, of the form: + # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. + # @!attribute [r] uid + # @return [::String] + # Output only. System generated globally unique ID for the job. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the job was started. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the job ended. + # @!attribute [r] state + # @return [::Google::Cloud::Dataplex::V1::Job::State] + # Output only. Execution state for the job. + # @!attribute [r] retry_count + # @return [::Integer] + # Output only. The number of times the job has been retried (excluding the + # initial attempt). + # @!attribute [r] service + # @return [::Google::Cloud::Dataplex::V1::Job::Service] + # Output only. The underlying service running a job. + # @!attribute [r] service_job + # @return [::String] + # Output only. The full resource name for the job run under a particular + # service. + # @!attribute [r] message + # @return [::String] + # Output only. Additional information about the current state. + # @!attribute [r] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. User-defined labels for the task. + # @!attribute [r] trigger + # @return [::Google::Cloud::Dataplex::V1::Job::Trigger] + # Output only. Job execution trigger. + # @!attribute [r] execution_spec + # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] + # Output only. Spec related to how a task is executed. + class Job + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module Service + # Service used to run the job is unspecified. + SERVICE_UNSPECIFIED = 0 + + # Dataproc service is used to run this job. + DATAPROC = 1 + end + + module State + # The job state is unknown. + STATE_UNSPECIFIED = 0 + + # The job is running. + RUNNING = 1 + + # The job is cancelling. + CANCELLING = 2 + + # The job cancellation was successful. + CANCELLED = 3 + + # The job completed successfully. + SUCCEEDED = 4 + + # The job is no longer running due to an error. + FAILED = 5 + + # The job was cancelled outside of Dataplex Universal Catalog. + ABORTED = 6 + end + + # Job execution trigger. + module Trigger + # The trigger is unspecified. + TRIGGER_UNSPECIFIED = 0 + + # The job was triggered by Dataplex Universal Catalog based on trigger spec + # from task definition. + TASK_CONFIG = 1 + + # The job was triggered by the explicit call of Task API. + RUN_REQUEST = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# 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 Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::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. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 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 Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 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 Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 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 Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 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 Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# 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 Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 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 Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 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 Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 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 Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile new file mode 100644 index 000000000000..352befc96409 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# 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! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-dataplex-v1", path: "../" +else + gem "google-cloud-dataplex-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary.rb new file mode 100644 index 000000000000..52cef3031028 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary.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_BusinessGlossaryService_CreateGlossary_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_glossary call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary. +# +def create_glossary + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new + + # Call the create_glossary method. + result = client.create_glossary request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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_BusinessGlossaryService_CreateGlossary_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_category.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_category.rb new file mode 100644 index 000000000000..378860f5e326 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_category.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_BusinessGlossaryService_CreateGlossaryCategory_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_glossary_category call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_category. +# +def create_glossary_category + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new + + # Call the create_glossary_category method. + result = client.create_glossary_category request + + # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. + p result +end +# [END dataplex_v1_generated_BusinessGlossaryService_CreateGlossaryCategory_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_term.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_term.rb new file mode 100644 index 000000000000..d1275cf10a6f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_term.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_BusinessGlossaryService_CreateGlossaryTerm_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_glossary_term call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_term. +# +def create_glossary_term + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new + + # Call the create_glossary_term method. + result = client.create_glossary_term request + + # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. + p result +end +# [END dataplex_v1_generated_BusinessGlossaryService_CreateGlossaryTerm_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary.rb new file mode 100644 index 000000000000..3fbdf3910b99 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary.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_BusinessGlossaryService_DeleteGlossary_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_glossary call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary. +# +def delete_glossary + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new + + # Call the delete_glossary method. + result = client.delete_glossary request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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_BusinessGlossaryService_DeleteGlossary_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_category.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_category.rb new file mode 100644 index 000000000000..8e5f8124895d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_category.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_BusinessGlossaryService_DeleteGlossaryCategory_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_glossary_category call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_category. +# +def delete_glossary_category + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new + + # Call the delete_glossary_category method. + result = client.delete_glossary_category request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_BusinessGlossaryService_DeleteGlossaryCategory_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_term.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_term.rb new file mode 100644 index 000000000000..17c5a723adc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_term.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_BusinessGlossaryService_DeleteGlossaryTerm_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_glossary_term call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_term. +# +def delete_glossary_term + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new + + # Call the delete_glossary_term method. + result = client.delete_glossary_term request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_BusinessGlossaryService_DeleteGlossaryTerm_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary.rb new file mode 100644 index 000000000000..a0e55d302ac3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary.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_BusinessGlossaryService_GetGlossary_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_glossary call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary. +# +def get_glossary + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetGlossaryRequest.new + + # Call the get_glossary method. + result = client.get_glossary request + + # The returned object is of type Google::Cloud::Dataplex::V1::Glossary. + p result +end +# [END dataplex_v1_generated_BusinessGlossaryService_GetGlossary_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_category.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_category.rb new file mode 100644 index 000000000000..1263e8de5308 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_category.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_BusinessGlossaryService_GetGlossaryCategory_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_glossary_category call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_category. +# +def get_glossary_category + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new + + # Call the get_glossary_category method. + result = client.get_glossary_category request + + # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. + p result +end +# [END dataplex_v1_generated_BusinessGlossaryService_GetGlossaryCategory_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_term.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_term.rb new file mode 100644 index 000000000000..6d88f6034a5e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_term.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_BusinessGlossaryService_GetGlossaryTerm_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_glossary_term call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_term. +# +def get_glossary_term + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new + + # Call the get_glossary_term method. + result = client.get_glossary_term request + + # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. + p result +end +# [END dataplex_v1_generated_BusinessGlossaryService_GetGlossaryTerm_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossaries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossaries.rb new file mode 100644 index 000000000000..3c77eb8cb2fa --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossaries.rb @@ -0,0 +1,51 @@ +# 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_BusinessGlossaryService_ListGlossaries_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_glossaries call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossaries. +# +def list_glossaries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListGlossariesRequest.new + + # Call the list_glossaries method. + result = client.list_glossaries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Glossary. + p item + end +end +# [END dataplex_v1_generated_BusinessGlossaryService_ListGlossaries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_categories.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_categories.rb new file mode 100644 index 000000000000..d815c59983be --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_categories.rb @@ -0,0 +1,51 @@ +# 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_BusinessGlossaryService_ListGlossaryCategories_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_glossary_categories call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_categories. +# +def list_glossary_categories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.new + + # Call the list_glossary_categories method. + result = client.list_glossary_categories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryCategory. + p item + end +end +# [END dataplex_v1_generated_BusinessGlossaryService_ListGlossaryCategories_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_terms.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_terms.rb new file mode 100644 index 000000000000..a9d981c66eec --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_terms.rb @@ -0,0 +1,51 @@ +# 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_BusinessGlossaryService_ListGlossaryTerms_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_glossary_terms call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_terms. +# +def list_glossary_terms + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.new + + # Call the list_glossary_terms method. + result = client.list_glossary_terms request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryTerm. + p item + end +end +# [END dataplex_v1_generated_BusinessGlossaryService_ListGlossaryTerms_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary.rb new file mode 100644 index 000000000000..d6d328535e6c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary.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_BusinessGlossaryService_UpdateGlossary_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_glossary call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary. +# +def update_glossary + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new + + # Call the update_glossary method. + result = client.update_glossary request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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_BusinessGlossaryService_UpdateGlossary_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_category.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_category.rb new file mode 100644 index 000000000000..42c4d375e8e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_category.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_BusinessGlossaryService_UpdateGlossaryCategory_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_glossary_category call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_category. +# +def update_glossary_category + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new + + # Call the update_glossary_category method. + result = client.update_glossary_category request + + # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. + p result +end +# [END dataplex_v1_generated_BusinessGlossaryService_UpdateGlossaryCategory_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_term.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_term.rb new file mode 100644 index 000000000000..ac8665a6408e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_term.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_BusinessGlossaryService_UpdateGlossaryTerm_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_glossary_term call in the BusinessGlossaryService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_term. +# +def update_glossary_term + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new + + # Call the update_glossary_term method. + result = client.update_glossary_term request + + # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. + p result +end +# [END dataplex_v1_generated_BusinessGlossaryService_UpdateGlossaryTerm_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/cancel_metadata_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/cancel_metadata_job.rb new file mode 100644 index 000000000000..f598643739d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/cancel_metadata_job.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_CatalogService_CancelMetadataJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the cancel_metadata_job call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#cancel_metadata_job. +# +def cancel_metadata_job + # 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::CancelMetadataJobRequest.new + + # Call the cancel_metadata_job method. + result = client.cancel_metadata_job request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_CatalogService_CancelMetadataJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb new file mode 100644 index 000000000000..d26197415d2e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_CreateAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type. +# +def create_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new + + # Call the create_aspect_type method. + result = client.create_aspect_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb new file mode 100644 index 000000000000..86738c025fc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_CreateEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry. +# +def create_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new + + # Call the create_entry method. + result = client.create_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_CreateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb new file mode 100644 index 000000000000..9b0364319d39 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_CreateEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group. +# +def create_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new + + # Call the create_entry_group method. + result = client.create_entry_group request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_link.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_link.rb new file mode 100644 index 000000000000..b73e72b56e36 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_link.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_CatalogService_CreateEntryLink_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_link. +# +def create_entry_link + # 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::CreateEntryLinkRequest.new + + # Call the create_entry_link method. + result = client.create_entry_link request + + # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. + p result +end +# [END dataplex_v1_generated_CatalogService_CreateEntryLink_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb new file mode 100644 index 000000000000..2f6b96d86908 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_CreateEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type. +# +def create_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new + + # Call the create_entry_type method. + result = client.create_entry_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb new file mode 100644 index 000000000000..afd8894dc4e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.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_CatalogService_CreateMetadataFeed_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_feed. +# +def create_metadata_feed + # 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 +end +# [END dataplex_v1_generated_CatalogService_CreateMetadataFeed_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_job.rb new file mode 100644 index 000000000000..bcad470a44e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_job.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_CatalogService_CreateMetadataJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_metadata_job call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_job. +# +def create_metadata_job + # 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::CreateMetadataJobRequest.new + + # Call the create_metadata_job method. + result = client.create_metadata_job request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_CreateMetadataJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb new file mode 100644 index 000000000000..d03c2739f9cd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_DeleteAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type. +# +def delete_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new + + # Call the delete_aspect_type method. + result = client.delete_aspect_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb new file mode 100644 index 000000000000..ce2b97b65462 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_DeleteEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry. +# +def delete_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new + + # Call the delete_entry method. + result = client.delete_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_DeleteEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb new file mode 100644 index 000000000000..469a6cb4cddd --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_DeleteEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group. +# +def delete_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new + + # Call the delete_entry_group method. + result = client.delete_entry_group request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_link.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_link.rb new file mode 100644 index 000000000000..e956dded8639 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_link.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_CatalogService_DeleteEntryLink_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_link. +# +def delete_entry_link + # 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 +end +# [END dataplex_v1_generated_CatalogService_DeleteEntryLink_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb new file mode 100644 index 000000000000..dafa54b5e7e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_DeleteEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type. +# +def delete_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new + + # Call the delete_entry_type method. + result = client.delete_entry_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb new file mode 100644 index 000000000000..207abc70da79 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.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_CatalogService_DeleteMetadataFeed_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_metadata_feed. +# +def delete_metadata_feed + # 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::DeleteMetadataFeedRequest.new + + # 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. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_DeleteMetadataFeed_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb new file mode 100644 index 000000000000..8e7cbaa382c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_GetAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type. +# +def get_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new + + # Call the get_aspect_type method. + result = client.get_aspect_type request + + # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. + p result +end +# [END dataplex_v1_generated_CatalogService_GetAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb new file mode 100644 index 000000000000..eb355b3e2143 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_GetEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry. +# +def get_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntryRequest.new + + # Call the get_entry method. + result = client.get_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_GetEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb new file mode 100644 index 000000000000..7042f54d29b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_GetEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group. +# +def get_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new + + # Call the get_entry_group method. + result = client.get_entry_group request + + # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. + p result +end +# [END dataplex_v1_generated_CatalogService_GetEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_link.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_link.rb new file mode 100644 index 000000000000..12833a20b84c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_link.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_CatalogService_GetEntryLink_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_link. +# +def get_entry_link + # 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 +end +# [END dataplex_v1_generated_CatalogService_GetEntryLink_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb new file mode 100644 index 000000000000..f6f24ffc01b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_GetEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type. +# +def get_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new + + # Call the get_entry_type method. + result = client.get_entry_type request + + # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. + p result +end +# [END dataplex_v1_generated_CatalogService_GetEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb new file mode 100644 index 000000000000..53455b6dd2ff --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.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_CatalogService_GetMetadataFeed_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_feed. +# +def get_metadata_feed + # 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::GetMetadataFeedRequest.new + + # Call the get_metadata_feed method. + result = client.get_metadata_feed request + + # The returned object is of type Google::Cloud::Dataplex::V1::MetadataFeed. + p result +end +# [END dataplex_v1_generated_CatalogService_GetMetadataFeed_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_job.rb new file mode 100644 index 000000000000..a8ada4f517ba --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_job.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_CatalogService_GetMetadataJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_metadata_job call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_job. +# +def get_metadata_job + # 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::GetMetadataJobRequest.new + + # Call the get_metadata_job method. + result = client.get_metadata_job request + + # The returned object is of type Google::Cloud::Dataplex::V1::MetadataJob. + p result +end +# [END dataplex_v1_generated_CatalogService_GetMetadataJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb new file mode 100644 index 000000000000..3701540ea298 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_ListAspectTypes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_aspect_types call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types. +# +def list_aspect_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new + + # Call the list_aspect_types method. + result = client.list_aspect_types request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListAspectTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb new file mode 100644 index 000000000000..e3cce7fa21cf --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_ListEntries_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entries call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries. +# +def list_entries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new + + # Call the list_entries method. + result = client.list_entries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb new file mode 100644 index 000000000000..7556100e6fee --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_ListEntryGroups_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entry_groups call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups. +# +def list_entry_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new + + # Call the list_entry_groups method. + result = client.list_entry_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListEntryGroups_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb new file mode 100644 index 000000000000..76e326428354 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_ListEntryTypes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entry_types call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types. +# +def list_entry_types + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new + + # Call the list_entry_types method. + result = client.list_entry_types request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListEntryTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb new file mode 100644 index 000000000000..b45e1252032e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb @@ -0,0 +1,51 @@ +# 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_CatalogService_ListMetadataFeeds_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_feeds. +# +def list_metadata_feeds + # 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 +end +# [END dataplex_v1_generated_CatalogService_ListMetadataFeeds_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_jobs.rb new file mode 100644 index 000000000000..9db0af0c90ee --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_jobs.rb @@ -0,0 +1,51 @@ +# 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_CatalogService_ListMetadataJobs_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_metadata_jobs call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_jobs. +# +def list_metadata_jobs + # 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::ListMetadataJobsRequest.new + + # Call the list_metadata_jobs method. + result = client.list_metadata_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataJob. + p item + end +end +# [END dataplex_v1_generated_CatalogService_ListMetadataJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb new file mode 100644 index 000000000000..8f88ea23a4f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.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_CatalogService_LookupContext_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_context. +# +def lookup_context + # 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 +end +# [END dataplex_v1_generated_CatalogService_LookupContext_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb new file mode 100644 index 000000000000..9c2e74773f39 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_LookupEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the lookup_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry. +# +def lookup_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new + + # Call the lookup_entry method. + result = client.lookup_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_LookupEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb new file mode 100644 index 000000000000..a1ac0ee161e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb @@ -0,0 +1,51 @@ +# 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_CatalogService_LookupEntryLinks_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry_links. +# +def lookup_entry_links + # 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 +end +# [END dataplex_v1_generated_CatalogService_LookupEntryLinks_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb new file mode 100644 index 000000000000..b11b45fe9050 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_SearchEntries_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the search_entries call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries. +# +def search_entries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new + + # Call the search_entries method. + result = client.search_entries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. + p item + end +end +# [END dataplex_v1_generated_CatalogService_SearchEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb new file mode 100644 index 000000000000..1be7311d6e0c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_UpdateAspectType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_aspect_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type. +# +def update_aspect_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new + + # Call the update_aspect_type method. + result = client.update_aspect_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_UpdateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb new file mode 100644 index 000000000000..5e8d89331f5d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_UpdateEntry_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entry call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry. +# +def update_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new + + # Call the update_entry method. + result = client.update_entry request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entry. + p result +end +# [END dataplex_v1_generated_CatalogService_UpdateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb new file mode 100644 index 000000000000..6b43d4391426 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_UpdateEntryGroup_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entry_group call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group. +# +def update_entry_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new + + # Call the update_entry_group method. + result = client.update_entry_group request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb new file mode 100644 index 000000000000..c57dfc9989b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.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_CatalogService_UpdateEntryLink_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_link. +# +def update_entry_link + # 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 +end +# [END dataplex_v1_generated_CatalogService_UpdateEntryLink_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb new file mode 100644 index 000000000000..5bcfe7cd9688 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_CatalogService_UpdateEntryType_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entry_type call in the CatalogService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type. +# +def update_entry_type + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CatalogService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new + + # Call the update_entry_type method. + result = client.update_entry_type request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_CatalogService_UpdateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb new file mode 100644 index 000000000000..1a59ced96990 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.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_CatalogService_UpdateMetadataFeed_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CatalogService::Client#update_metadata_feed. +# +def update_metadata_feed + # 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 +end +# [END dataplex_v1_generated_CatalogService_UpdateMetadataFeed_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/create_encryption_config.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/create_encryption_config.rb new file mode 100644 index 000000000000..53e965a74e30 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/create_encryption_config.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_CmekService_CreateEncryptionConfig_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_encryption_config call in the CmekService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CmekService::Client#create_encryption_config. +# +def create_encryption_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CmekService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new + + # Call the create_encryption_config method. + result = client.create_encryption_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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_CmekService_CreateEncryptionConfig_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/delete_encryption_config.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/delete_encryption_config.rb new file mode 100644 index 000000000000..fdaadf43df1a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/delete_encryption_config.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_CmekService_DeleteEncryptionConfig_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_encryption_config call in the CmekService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CmekService::Client#delete_encryption_config. +# +def delete_encryption_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CmekService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new + + # Call the delete_encryption_config method. + result = client.delete_encryption_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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_CmekService_DeleteEncryptionConfig_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/get_encryption_config.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/get_encryption_config.rb new file mode 100644 index 000000000000..17e02b5f32f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/get_encryption_config.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_CmekService_GetEncryptionConfig_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_encryption_config call in the CmekService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CmekService::Client#get_encryption_config. +# +def get_encryption_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CmekService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new + + # Call the get_encryption_config method. + result = client.get_encryption_config request + + # The returned object is of type Google::Cloud::Dataplex::V1::EncryptionConfig. + p result +end +# [END dataplex_v1_generated_CmekService_GetEncryptionConfig_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/list_encryption_configs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/list_encryption_configs.rb new file mode 100644 index 000000000000..50361d77e002 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/list_encryption_configs.rb @@ -0,0 +1,51 @@ +# 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_CmekService_ListEncryptionConfigs_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_encryption_configs call in the CmekService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CmekService::Client#list_encryption_configs. +# +def list_encryption_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CmekService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.new + + # Call the list_encryption_configs method. + result = client.list_encryption_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::EncryptionConfig. + p item + end +end +# [END dataplex_v1_generated_CmekService_ListEncryptionConfigs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/update_encryption_config.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/update_encryption_config.rb new file mode 100644 index 000000000000..11420afa8d94 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/update_encryption_config.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_CmekService_UpdateEncryptionConfig_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_encryption_config call in the CmekService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::CmekService::Client#update_encryption_config. +# +def update_encryption_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::CmekService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new + + # Call the update_encryption_config method. + result = client.update_encryption_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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_CmekService_UpdateEncryptionConfig_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb new file mode 100644 index 000000000000..ba942509436a --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/create_data_product.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/create_data_product.rb new file mode 100644 index 000000000000..43b53a2fc413 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_asset.rb new file mode 100644 index 000000000000..23c6b3e0de7a --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_product.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_product.rb new file mode 100644 index 000000000000..b6370392560d --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb new file mode 100644 index 000000000000..1bbfee6646a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.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_GetDataAsset_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client 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_asset. +# +def get_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::GetDataAssetRequest.new + + # Call the get_data_asset method. + result = client.get_data_asset request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataAsset. + p result +end +# [END dataplex_v1_generated_DataProductService_GetDataAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_product.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_product.rb new file mode 100644 index 000000000000..6d5e4d773307 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb new file mode 100644 index 000000000000..44c24349cbf7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb @@ -0,0 +1,51 @@ +# 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_ListDataAssets_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client 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#list_data_assets. +# +def list_data_assets + # 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::ListDataAssetsRequest.new + + # 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::DataAsset. + p item + end +end +# [END dataplex_v1_generated_DataProductService_ListDataAssets_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb new file mode 100644 index 000000000000..7149bc2dc5cb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb @@ -0,0 +1,51 @@ +# 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_ListDataProducts_sync] +require "google/cloud/dataplex/v1" + +## +# 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: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client 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#list_data_products. +# +def list_data_products + # 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::ListDataProductsRequest.new + + # Call the list_data_products method. + result = client.list_data_products request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, 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_DataProductService_ListDataProducts_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/update_data_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/update_data_asset.rb new file mode 100644 index 000000000000..92a11ec7490f --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/update_data_product.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/update_data_product.rb new file mode 100644 index 000000000000..78a196fc14e0 --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb new file mode 100644 index 000000000000..f2abf8640242 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataScanService_CreateDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan. +# +def create_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new + + # Call the create_data_scan method. + result = client.create_data_scan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataScanService_CreateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb new file mode 100644 index 000000000000..abffedf517dc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataScanService_DeleteDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan. +# +def delete_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new + + # Call the delete_data_scan method. + result = client.delete_data_scan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataScanService_DeleteDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb new file mode 100644 index 000000000000..25e98516ceee --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataScanService_GenerateDataQualityRules_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the generate_data_quality_rules call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules. +# +def generate_data_quality_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new + + # Call the generate_data_quality_rules method. + result = client.generate_data_quality_rules request + + # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. + p result +end +# [END dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb new file mode 100644 index 000000000000..b67886dd49e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataScanService_GetDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan. +# +def get_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new + + # Call the get_data_scan method. + result = client.get_data_scan request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. + p result +end +# [END dataplex_v1_generated_DataScanService_GetDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb new file mode 100644 index 000000000000..c533dcb32452 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataScanService_GetDataScanJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_scan_job call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job. +# +def get_data_scan_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new + + # Call the get_data_scan_job method. + result = client.get_data_scan_job request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. + p result +end +# [END dataplex_v1_generated_DataScanService_GetDataScanJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb new file mode 100644 index 000000000000..8a12b7f8a9c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataScanService_ListDataScanJobs_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_scan_jobs call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs. +# +def list_data_scan_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new + + # Call the list_data_scan_jobs method. + result = client.list_data_scan_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. + p item + end +end +# [END dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb new file mode 100644 index 000000000000..2a2f91ddf3f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataScanService_ListDataScans_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_scans call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans. +# +def list_data_scans + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new + + # Call the list_data_scans method. + result = client.list_data_scans request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. + p item + end +end +# [END dataplex_v1_generated_DataScanService_ListDataScans_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb new file mode 100644 index 000000000000..83f51308fff7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataScanService_RunDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the run_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan. +# +def run_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new + + # Call the run_data_scan method. + result = client.run_data_scan request + + # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. + p result +end +# [END dataplex_v1_generated_DataScanService_RunDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb new file mode 100644 index 000000000000..57d0caf88a9b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataScanService_UpdateDataScan_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_scan call in the DataScanService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan. +# +def update_data_scan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataScanService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new + + # Call the update_data_scan method. + result = client.update_data_scan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataScanService_UpdateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb new file mode 100644 index 000000000000..343638fe0770 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_CreateDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute. +# +def create_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new + + # Call the create_data_attribute method. + result = client.create_data_attribute request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb new file mode 100644 index 000000000000..7f0a63f9cfcf --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_CreateDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding. +# +def create_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new + + # Call the create_data_attribute_binding method. + result = client.create_data_attribute_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb new file mode 100644 index 000000000000..7d60c45a3d29 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_CreateDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy. +# +def create_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new + + # Call the create_data_taxonomy method. + result = client.create_data_taxonomy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb new file mode 100644 index 000000000000..008961f379f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_DeleteDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute. +# +def delete_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new + + # Call the delete_data_attribute method. + result = client.delete_data_attribute request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb new file mode 100644 index 000000000000..a94515914904 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_DeleteDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding. +# +def delete_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new + + # Call the delete_data_attribute_binding method. + result = client.delete_data_attribute_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb new file mode 100644 index 000000000000..6080f761c2ae --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_DeleteDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy. +# +def delete_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new + + # Call the delete_data_taxonomy method. + result = client.delete_data_taxonomy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb new file mode 100644 index 000000000000..bc27c9c57240 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_GetDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute. +# +def get_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new + + # Call the get_data_attribute method. + result = client.get_data_attribute request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. + p result +end +# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb new file mode 100644 index 000000000000..7513d2e37465 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_GetDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding. +# +def get_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new + + # Call the get_data_attribute_binding method. + result = client.get_data_attribute_binding request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. + p result +end +# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb new file mode 100644 index 000000000000..c9626bdedb08 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_GetDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy. +# +def get_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new + + # Call the get_data_taxonomy method. + result = client.get_data_taxonomy request + + # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. + p result +end +# [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb new file mode 100644 index 000000000000..d831b566da63 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_ListDataAttributeBindings_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings. +# +def list_data_attribute_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new + + # Call the list_data_attribute_bindings method. + result = client.list_data_attribute_bindings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. + p item + end +end +# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb new file mode 100644 index 000000000000..b502571bba95 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_ListDataAttributes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_attributes call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes. +# +def list_data_attributes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new + + # Call the list_data_attributes method. + result = client.list_data_attributes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. + p item + end +end +# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb new file mode 100644 index 000000000000..cd6525ed9203 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_ListDataTaxonomies_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_data_taxonomies call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies. +# +def list_data_taxonomies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new + + # Call the list_data_taxonomies method. + result = client.list_data_taxonomies request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. + p item + end +end +# [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb new file mode 100644 index 000000000000..3c4cfd82e2ad --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_UpdateDataAttribute_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_attribute call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute. +# +def update_data_attribute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new + + # Call the update_data_attribute method. + result = client.update_data_attribute request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb new file mode 100644 index 000000000000..b2ded383f2d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_UpdateDataAttributeBinding_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_attribute_binding call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding. +# +def update_data_attribute_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new + + # Call the update_data_attribute_binding method. + result = client.update_data_attribute_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb new file mode 100644 index 000000000000..a5957abad25e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataTaxonomyService_UpdateDataTaxonomy_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_data_taxonomy call in the DataTaxonomyService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy. +# +def update_data_taxonomy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new + + # Call the update_data_taxonomy method. + result = client.update_data_taxonomy request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb new file mode 100644 index 000000000000..e270a5045cd9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_CancelJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the cancel_job call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job. +# +def cancel_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CancelJobRequest.new + + # Call the cancel_job method. + result = client.cancel_job request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_DataplexService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb new file mode 100644 index 000000000000..e65b2cdaa34b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_CreateAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset. +# +def create_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new + + # Call the create_asset method. + result = client.create_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb new file mode 100644 index 000000000000..5ca707d0e417 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_CreateLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake. +# +def create_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new + + # Call the create_lake method. + result = client.create_lake request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb new file mode 100644 index 000000000000..cf0f4abe140c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_CreateTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_task. +# +def create_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new + + # Call the create_task method. + result = client.create_task request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb new file mode 100644 index 000000000000..a1fd9c9e5f70 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_CreateZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone. +# +def create_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new + + # Call the create_zone method. + result = client.create_zone request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_CreateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb new file mode 100644 index 000000000000..bc945d9b4579 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_DeleteAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset. +# +def delete_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new + + # Call the delete_asset method. + result = client.delete_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb new file mode 100644 index 000000000000..534220f2d987 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_DeleteLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake. +# +def delete_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new + + # Call the delete_lake method. + result = client.delete_lake request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb new file mode 100644 index 000000000000..674a315b309c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_DeleteTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task. +# +def delete_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new + + # Call the delete_task method. + result = client.delete_task request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb new file mode 100644 index 000000000000..9a1f6aa2e916 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_DeleteZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone. +# +def delete_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new + + # Call the delete_zone method. + result = client.delete_zone request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_DeleteZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb new file mode 100644 index 000000000000..ba0a52f5a894 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_GetAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset. +# +def get_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetAssetRequest.new + + # Call the get_asset method. + result = client.get_asset request + + # The returned object is of type Google::Cloud::Dataplex::V1::Asset. + p result +end +# [END dataplex_v1_generated_DataplexService_GetAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb new file mode 100644 index 000000000000..abc4248ee618 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_GetJob_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_job call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_job. +# +def get_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetJobRequest.new + + # Call the get_job method. + result = client.get_job request + + # The returned object is of type Google::Cloud::Dataplex::V1::Job. + p result +end +# [END dataplex_v1_generated_DataplexService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb new file mode 100644 index 000000000000..e477071d760e --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_GetLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake. +# +def get_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetLakeRequest.new + + # Call the get_lake method. + result = client.get_lake request + + # The returned object is of type Google::Cloud::Dataplex::V1::Lake. + p result +end +# [END dataplex_v1_generated_DataplexService_GetLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb new file mode 100644 index 000000000000..bce1a55092a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_GetTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_task. +# +def get_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetTaskRequest.new + + # Call the get_task method. + result = client.get_task request + + # The returned object is of type Google::Cloud::Dataplex::V1::Task. + p result +end +# [END dataplex_v1_generated_DataplexService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb new file mode 100644 index 000000000000..fadd7d088d6f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_GetZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone. +# +def get_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetZoneRequest.new + + # Call the get_zone method. + result = client.get_zone request + + # The returned object is of type Google::Cloud::Dataplex::V1::Zone. + p result +end +# [END dataplex_v1_generated_DataplexService_GetZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb new file mode 100644 index 000000000000..9f0196205d62 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_ListAssetActions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_asset_actions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions. +# +def list_asset_actions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new + + # Call the list_asset_actions method. + result = client.list_asset_actions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListAssetActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb new file mode 100644 index 000000000000..d49ded2de815 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_ListAssets_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_assets call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets. +# +def list_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new + + # Call the list_assets method. + result = client.list_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb new file mode 100644 index 000000000000..5fb95b9ba318 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_ListJobs_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_jobs call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs. +# +def list_jobs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListJobsRequest.new + + # Call the list_jobs method. + result = client.list_jobs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Job. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb new file mode 100644 index 000000000000..1a3929afabb6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_ListLakeActions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_lake_actions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions. +# +def list_lake_actions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new + + # Call the list_lake_actions method. + result = client.list_lake_actions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListLakeActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb new file mode 100644 index 000000000000..90977eae1169 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_ListLakes_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_lakes call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes. +# +def list_lakes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListLakesRequest.new + + # Call the list_lakes method. + result = client.list_lakes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListLakes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb new file mode 100644 index 000000000000..8e73e41e8f76 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_ListTasks_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_tasks call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks. +# +def list_tasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListTasksRequest.new + + # Call the list_tasks method. + result = client.list_tasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Task. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb new file mode 100644 index 000000000000..9d971270db62 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_ListZoneActions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_zone_actions call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions. +# +def list_zone_actions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new + + # Call the list_zone_actions method. + result = client.list_zone_actions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Action. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListZoneActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb new file mode 100644 index 000000000000..171a05db3b8b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_ListZones_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_zones call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones. +# +def list_zones + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListZonesRequest.new + + # Call the list_zones method. + result = client.list_zones request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. + p item + end +end +# [END dataplex_v1_generated_DataplexService_ListZones_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb new file mode 100644 index 000000000000..049ab80e837c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_RunTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the run_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#run_task. +# +def run_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::RunTaskRequest.new + + # Call the run_task method. + result = client.run_task request + + # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. + p result +end +# [END dataplex_v1_generated_DataplexService_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb new file mode 100644 index 000000000000..2e250e4ed801 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_UpdateAsset_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_asset call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset. +# +def update_asset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new + + # Call the update_asset method. + result = client.update_asset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb new file mode 100644 index 000000000000..27aa817718de --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_UpdateLake_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_lake call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake. +# +def update_lake + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new + + # Call the update_lake method. + result = client.update_lake request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb new file mode 100644 index 000000000000..70c6ca8366a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_UpdateTask_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_task call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_task. +# +def update_task + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new + + # Call the update_task method. + result = client.update_task request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb new file mode 100644 index 000000000000..1884af85c355 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 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_DataplexService_UpdateZone_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_zone call in the DataplexService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone. +# +def update_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::DataplexService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new + + # Call the update_zone method. + result = client.update_zone request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataplex_v1_generated_DataplexService_UpdateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb new file mode 100644 index 000000000000..5db5eaca9f7b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_MetadataService_CreateEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity. +# +def create_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new + + # Call the create_entity method. + result = client.create_entity request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + p result +end +# [END dataplex_v1_generated_MetadataService_CreateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb new file mode 100644 index 000000000000..ed7fa6eb509d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_MetadataService_CreatePartition_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the create_partition call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition. +# +def create_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new + + # Call the create_partition method. + result = client.create_partition request + + # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + p result +end +# [END dataplex_v1_generated_MetadataService_CreatePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb new file mode 100644 index 000000000000..5e58d0b207c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_MetadataService_DeleteEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity. +# +def delete_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new + + # Call the delete_entity method. + result = client.delete_entity request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_MetadataService_DeleteEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb new file mode 100644 index 000000000000..d19d531ed65b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_MetadataService_DeletePartition_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the delete_partition call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition. +# +def delete_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new + + # Call the delete_partition method. + result = client.delete_partition request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataplex_v1_generated_MetadataService_DeletePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb new file mode 100644 index 000000000000..bca1e119be2c --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_MetadataService_GetEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity. +# +def get_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetEntityRequest.new + + # Call the get_entity method. + result = client.get_entity request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + p result +end +# [END dataplex_v1_generated_MetadataService_GetEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb new file mode 100644 index 000000000000..e15771a9b4eb --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_MetadataService_GetPartition_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the get_partition call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition. +# +def get_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new + + # Call the get_partition method. + result = client.get_partition request + + # The returned object is of type Google::Cloud::Dataplex::V1::Partition. + p result +end +# [END dataplex_v1_generated_MetadataService_GetPartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb new file mode 100644 index 000000000000..af8af99eba53 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_MetadataService_ListEntities_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_entities call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities. +# +def list_entities + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new + + # Call the list_entities method. + result = client.list_entities request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. + p item + end +end +# [END dataplex_v1_generated_MetadataService_ListEntities_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb new file mode 100644 index 000000000000..3ba6349e822d --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 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_MetadataService_ListPartitions_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the list_partitions call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions. +# +def list_partitions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new + + # Call the list_partitions method. + result = client.list_partitions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. + p item + end +end +# [END dataplex_v1_generated_MetadataService_ListPartitions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb new file mode 100644 index 000000000000..4a8cd114d289 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 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_MetadataService_UpdateEntity_sync] +require "google/cloud/dataplex/v1" + +## +# Snippet for the update_entity call in the MetadataService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity. +# +def update_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataplex::V1::MetadataService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new + + # Call the update_entity method. + result = client.update_entity request + + # The returned object is of type Google::Cloud::Dataplex::V1::Entity. + p result +end +# [END dataplex_v1_generated_MetadataService_UpdateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json b/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json new file mode 100644 index 000000000000..1321a46680e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json @@ -0,0 +1,5095 @@ +{ + "client_library": { + "name": "google-cloud-dataplex-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.dataplex.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateLake_sync", + "title": "Snippet for the create_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake.", + "file": "dataplex_service/create_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateLake_sync", + "title": "Snippet for the update_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake.", + "file": "dataplex_service/update_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteLake_sync", + "title": "Snippet for the delete_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake.", + "file": "dataplex_service/delete_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListLakes_sync", + "title": "Snippet for the list_lakes call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes.", + "file": "dataplex_service/list_lakes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lakes", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListLakesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListLakesResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListLakes", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakes", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetLake_sync", + "title": "Snippet for the get_lake call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake.", + "file": "dataplex_service/get_lake.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_lake", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetLakeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Lake", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetLake", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetLake", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListLakeActions_sync", + "title": "Snippet for the list_lake_actions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions.", + "file": "dataplex_service/list_lake_actions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_lake_actions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListLakeActionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListLakeActions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateZone_sync", + "title": "Snippet for the create_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone.", + "file": "dataplex_service/create_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateZone_sync", + "title": "Snippet for the update_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone.", + "file": "dataplex_service/update_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteZone_sync", + "title": "Snippet for the delete_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone.", + "file": "dataplex_service/delete_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListZones_sync", + "title": "Snippet for the list_zones call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones.", + "file": "dataplex_service/list_zones.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_zones", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListZonesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListZonesResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListZones", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListZones", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetZone_sync", + "title": "Snippet for the get_zone call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone.", + "file": "dataplex_service/get_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_zone", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Zone", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetZone", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetZone", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListZoneActions_sync", + "title": "Snippet for the list_zone_actions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions.", + "file": "dataplex_service/list_zone_actions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_zone_actions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListZoneActionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListZoneActions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateAsset_sync", + "title": "Snippet for the create_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset.", + "file": "dataplex_service/create_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateAsset_sync", + "title": "Snippet for the update_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset.", + "file": "dataplex_service/update_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteAsset_sync", + "title": "Snippet for the delete_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset.", + "file": "dataplex_service/delete_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListAssets_sync", + "title": "Snippet for the list_assets call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets.", + "file": "dataplex_service/list_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assets", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListAssetsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListAssets", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssets", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetAsset_sync", + "title": "Snippet for the get_asset call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset.", + "file": "dataplex_service/get_asset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Asset", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetAsset", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetAsset", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListAssetActions_sync", + "title": "Snippet for the list_asset_actions call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions.", + "file": "dataplex_service/list_asset_actions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_asset_actions", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListAssetActionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListAssetActions", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CreateTask_sync", + "title": "Snippet for the create_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_task.", + "file": "dataplex_service/create_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CreateTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.CreateTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_UpdateTask_sync", + "title": "Snippet for the update_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_task.", + "file": "dataplex_service/update_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "UpdateTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_DeleteTask_sync", + "title": "Snippet for the delete_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task.", + "file": "dataplex_service/delete_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "DeleteTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListTasks_sync", + "title": "Snippet for the list_tasks call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks.", + "file": "dataplex_service/list_tasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_tasks", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListTasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListTasksResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListTasks", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListTasks", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetTask_sync", + "title": "Snippet for the get_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_task.", + "file": "dataplex_service/get_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Task", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_ListJobs_sync", + "title": "Snippet for the list_jobs call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs.", + "file": "dataplex_service/list_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_jobs", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListJobsResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "ListJobs", + "full_name": "google.cloud.dataplex.v1.DataplexService.ListJobs", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_RunTask_sync", + "title": "Snippet for the run_task call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#run_task.", + "file": "dataplex_service/run_task.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_task", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#run_task", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::RunTaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::RunTaskResponse", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "RunTask", + "full_name": "google.cloud.dataplex.v1.DataplexService.RunTask", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_GetJob_sync", + "title": "Snippet for the get_job call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_job.", + "file": "dataplex_service/get_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_job", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Job", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "GetJob", + "full_name": "google.cloud.dataplex.v1.DataplexService.GetJob", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataplexService_CancelJob_sync", + "title": "Snippet for the cancel_job call in the DataplexService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job.", + "file": "dataplex_service/cancel_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_job", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CancelJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataplexService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" + }, + "method": { + "short_name": "CancelJob", + "full_name": "google.cloud.dataplex.v1.DataplexService.CancelJob", + "service": { + "short_name": "DataplexService", + "full_name": "google.cloud.dataplex.v1.DataplexService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_CreateGlossary_sync", + "title": "Snippet for the create_glossary call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary.", + "file": "business_glossary_service/create_glossary.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_glossary", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateGlossaryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "CreateGlossary", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.CreateGlossary", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_UpdateGlossary_sync", + "title": "Snippet for the update_glossary call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary.", + "file": "business_glossary_service/update_glossary.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_glossary", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "UpdateGlossary", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.UpdateGlossary", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_DeleteGlossary_sync", + "title": "Snippet for the delete_glossary call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary.", + "file": "business_glossary_service/delete_glossary.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_glossary", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "DeleteGlossary", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.DeleteGlossary", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_GetGlossary_sync", + "title": "Snippet for the get_glossary call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary.", + "file": "business_glossary_service/get_glossary.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_glossary", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetGlossaryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Glossary", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "GetGlossary", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.GetGlossary", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_ListGlossaries_sync", + "title": "Snippet for the list_glossaries call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossaries.", + "file": "business_glossary_service/list_glossaries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_glossaries", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossaries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListGlossariesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListGlossariesResponse", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "ListGlossaries", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.ListGlossaries", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_CreateGlossaryCategory_sync", + "title": "Snippet for the create_glossary_category call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_category.", + "file": "business_glossary_service/create_glossary_category.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_glossary_category", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_category", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::GlossaryCategory", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "CreateGlossaryCategory", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.CreateGlossaryCategory", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_UpdateGlossaryCategory_sync", + "title": "Snippet for the update_glossary_category call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_category.", + "file": "business_glossary_service/update_glossary_category.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_glossary_category", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_category", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::GlossaryCategory", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "UpdateGlossaryCategory", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.UpdateGlossaryCategory", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_DeleteGlossaryCategory_sync", + "title": "Snippet for the delete_glossary_category call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_category.", + "file": "business_glossary_service/delete_glossary_category.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_glossary_category", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_category", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "DeleteGlossaryCategory", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.DeleteGlossaryCategory", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_GetGlossaryCategory_sync", + "title": "Snippet for the get_glossary_category call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_category.", + "file": "business_glossary_service/get_glossary_category.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_glossary_category", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_category", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::GlossaryCategory", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "GetGlossaryCategory", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.GetGlossaryCategory", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_ListGlossaryCategories_sync", + "title": "Snippet for the list_glossary_categories call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_categories.", + "file": "business_glossary_service/list_glossary_categories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_glossary_categories", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_categories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "ListGlossaryCategories", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.ListGlossaryCategories", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_CreateGlossaryTerm_sync", + "title": "Snippet for the create_glossary_term call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_term.", + "file": "business_glossary_service/create_glossary_term.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_glossary_term", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_term", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::GlossaryTerm", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "CreateGlossaryTerm", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.CreateGlossaryTerm", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_UpdateGlossaryTerm_sync", + "title": "Snippet for the update_glossary_term call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_term.", + "file": "business_glossary_service/update_glossary_term.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_glossary_term", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_term", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::GlossaryTerm", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "UpdateGlossaryTerm", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.UpdateGlossaryTerm", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_DeleteGlossaryTerm_sync", + "title": "Snippet for the delete_glossary_term call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_term.", + "file": "business_glossary_service/delete_glossary_term.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_glossary_term", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_term", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "DeleteGlossaryTerm", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.DeleteGlossaryTerm", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_GetGlossaryTerm_sync", + "title": "Snippet for the get_glossary_term call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_term.", + "file": "business_glossary_service/get_glossary_term.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_glossary_term", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_term", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::GlossaryTerm", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "GetGlossaryTerm", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.GetGlossaryTerm", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_BusinessGlossaryService_ListGlossaryTerms_sync", + "title": "Snippet for the list_glossary_terms call in the BusinessGlossaryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_terms.", + "file": "business_glossary_service/list_glossary_terms.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_glossary_terms", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_terms", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse", + "client": { + "short_name": "BusinessGlossaryService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" + }, + "method": { + "short_name": "ListGlossaryTerms", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.ListGlossaryTerms", + "service": { + "short_name": "BusinessGlossaryService", + "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryType_sync", + "title": "Snippet for the create_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type.", + "file": "catalog_service/create_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryType_sync", + "title": "Snippet for the update_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type.", + "file": "catalog_service/update_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryType_sync", + "title": "Snippet for the delete_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type.", + "file": "catalog_service/delete_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListEntryTypes_sync", + "title": "Snippet for the list_entry_types call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types.", + "file": "catalog_service/list_entry_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entry_types", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntryTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntryTypesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListEntryTypes", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetEntryType_sync", + "title": "Snippet for the get_entry_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type.", + "file": "catalog_service/get_entry_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::EntryType", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetEntryType", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateAspectType_sync", + "title": "Snippet for the create_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type.", + "file": "catalog_service/create_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateAspectType_sync", + "title": "Snippet for the update_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type.", + "file": "catalog_service/update_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteAspectType_sync", + "title": "Snippet for the delete_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type.", + "file": "catalog_service/delete_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListAspectTypes_sync", + "title": "Snippet for the list_aspect_types call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types.", + "file": "catalog_service/list_aspect_types.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_aspect_types", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListAspectTypesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListAspectTypesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListAspectTypes", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetAspectType_sync", + "title": "Snippet for the get_aspect_type call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type.", + "file": "catalog_service/get_aspect_type.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_aspect_type", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetAspectTypeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::AspectType", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetAspectType", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetAspectType", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryGroup_sync", + "title": "Snippet for the create_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group.", + "file": "catalog_service/create_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync", + "title": "Snippet for the update_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group.", + "file": "catalog_service/update_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync", + "title": "Snippet for the delete_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group.", + "file": "catalog_service/delete_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListEntryGroups_sync", + "title": "Snippet for the list_entry_groups call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups.", + "file": "catalog_service/list_entry_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entry_groups", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListEntryGroups", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetEntryGroup_sync", + "title": "Snippet for the get_entry_group call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group.", + "file": "catalog_service/get_entry_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry_group", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::EntryGroup", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetEntryGroup", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateEntry_sync", + "title": "Snippet for the create_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry.", + "file": "catalog_service/create_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntry_sync", + "title": "Snippet for the update_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry.", + "file": "catalog_service/update_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "UpdateEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntry_sync", + "title": "Snippet for the delete_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry.", + "file": "catalog_service/delete_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "DeleteEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_ListEntries_sync", + "title": "Snippet for the list_entries call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries.", + "file": "catalog_service/list_entries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entries", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntriesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListEntries", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntries", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_GetEntry_sync", + "title": "Snippet for the get_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry.", + "file": "catalog_service/get_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_LookupEntry_sync", + "title": "Snippet for the lookup_entry call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry.", + "file": "catalog_service/lookup_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_entry", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::LookupEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entry", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "LookupEntry", + "full_name": "google.cloud.dataplex.v1.CatalogService.LookupEntry", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_SearchEntries_sync", + "title": "Snippet for the search_entries call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries.", + "file": "catalog_service/search_entries.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_entries", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::SearchEntriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::SearchEntriesResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "SearchEntries", + "full_name": "google.cloud.dataplex.v1.CatalogService.SearchEntries", + "service": { + "short_name": "CatalogService", + "full_name": "google.cloud.dataplex.v1.CatalogService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CatalogService_CreateMetadataJob_sync", + "title": "Snippet for the create_metadata_job call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_job.", + "file": "catalog_service/create_metadata_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_metadata_job", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CreateMetadataJob", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateMetadataJob", + "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_GetMetadataJob_sync", + "title": "Snippet for the get_metadata_job call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_job.", + "file": "catalog_service/get_metadata_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_metadata_job", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetMetadataJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::MetadataJob", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "GetMetadataJob", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetMetadataJob", + "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_ListMetadataJobs_sync", + "title": "Snippet for the list_metadata_jobs call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_jobs.", + "file": "catalog_service/list_metadata_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_metadata_jobs", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "ListMetadataJobs", + "full_name": "google.cloud.dataplex.v1.CatalogService.ListMetadataJobs", + "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_CancelMetadataJob_sync", + "title": "Snippet for the cancel_metadata_job call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#cancel_metadata_job.", + "file": "catalog_service/cancel_metadata_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_metadata_job", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#cancel_metadata_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CatalogService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" + }, + "method": { + "short_name": "CancelMetadataJob", + "full_name": "google.cloud.dataplex.v1.CatalogService.CancelMetadataJob", + "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_CreateEntryLink_sync", + "title": "Snippet for the create_entry_link call in the CatalogService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_link.", + "file": "catalog_service/create_entry_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entry_link", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest", + "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": "CreateEntryLink", + "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryLink", + "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_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", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_link.", + "file": "catalog_service/delete_entry_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entry_link", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest", + "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": "DeleteEntryLink", + "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryLink", + "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_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", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_link.", + "file": "catalog_service/get_entry_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entry_link", + "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntryLinkRequest", + "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": "GetEntryLink", + "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryLink", + "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_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", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#create_encryption_config.", + "file": "cmek_service/create_encryption_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_encryption_config", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#create_encryption_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CmekService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" + }, + "method": { + "short_name": "CreateEncryptionConfig", + "full_name": "google.cloud.dataplex.v1.CmekService.CreateEncryptionConfig", + "service": { + "short_name": "CmekService", + "full_name": "google.cloud.dataplex.v1.CmekService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CmekService_UpdateEncryptionConfig_sync", + "title": "Snippet for the update_encryption_config call in the CmekService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#update_encryption_config.", + "file": "cmek_service/update_encryption_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_encryption_config", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#update_encryption_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CmekService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" + }, + "method": { + "short_name": "UpdateEncryptionConfig", + "full_name": "google.cloud.dataplex.v1.CmekService.UpdateEncryptionConfig", + "service": { + "short_name": "CmekService", + "full_name": "google.cloud.dataplex.v1.CmekService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CmekService_DeleteEncryptionConfig_sync", + "title": "Snippet for the delete_encryption_config call in the CmekService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#delete_encryption_config.", + "file": "cmek_service/delete_encryption_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_encryption_config", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#delete_encryption_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CmekService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" + }, + "method": { + "short_name": "DeleteEncryptionConfig", + "full_name": "google.cloud.dataplex.v1.CmekService.DeleteEncryptionConfig", + "service": { + "short_name": "CmekService", + "full_name": "google.cloud.dataplex.v1.CmekService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CmekService_ListEncryptionConfigs_sync", + "title": "Snippet for the list_encryption_configs call in the CmekService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#list_encryption_configs.", + "file": "cmek_service/list_encryption_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_encryption_configs", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#list_encryption_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse", + "client": { + "short_name": "CmekService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" + }, + "method": { + "short_name": "ListEncryptionConfigs", + "full_name": "google.cloud.dataplex.v1.CmekService.ListEncryptionConfigs", + "service": { + "short_name": "CmekService", + "full_name": "google.cloud.dataplex.v1.CmekService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_CmekService_GetEncryptionConfig_sync", + "title": "Snippet for the get_encryption_config call in the CmekService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#get_encryption_config.", + "file": "cmek_service/get_encryption_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_encryption_config", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#get_encryption_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::EncryptionConfig", + "client": { + "short_name": "CmekService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" + }, + "method": { + "short_name": "GetEncryptionConfig", + "full_name": "google.cloud.dataplex.v1.CmekService.GetEncryptionConfig", + "service": { + "short_name": "CmekService", + "full_name": "google.cloud.dataplex.v1.CmekService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "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_data_product", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_product", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "CreateDataProduct", + "full_name": "google.cloud.dataplex.v1.DataProductService.CreateDataProduct", + "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_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": "delete_data_product", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#delete_data_product", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "DeleteDataProduct", + "full_name": "google.cloud.dataplex.v1.DataProductService.DeleteDataProduct", + "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_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": "get_data_product", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_product", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataProduct", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "GetDataProduct", + "full_name": "google.cloud.dataplex.v1.DataProductService.GetDataProduct", + "service": { + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "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": "list_data_products", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_products", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataProductsResponse", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "ListDataProducts", + "full_name": "google.cloud.dataplex.v1.DataProductService.ListDataProducts", + "service": { + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "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": "update_data_product", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#update_data_product", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "UpdateDataProduct", + "full_name": "google.cloud.dataplex.v1.DataProductService.UpdateDataProduct", + "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_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": "create_data_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "CreateDataAsset", + "full_name": "google.cloud.dataplex.v1.DataProductService.CreateDataAsset", + "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_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_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": "get_data_asset", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_asset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataAssetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataAsset", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "GetDataAsset", + "full_name": "google.cloud.dataplex.v1.DataProductService.GetDataAsset", + "service": { + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "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_data_assets", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataAssetsResponse", + "client": { + "short_name": "DataProductService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" + }, + "method": { + "short_name": "ListDataAssets", + "full_name": "google.cloud.dataplex.v1.DataProductService.ListDataAssets", + "service": { + "short_name": "DataProductService", + "full_name": "google.cloud.dataplex.v1.DataProductService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync", + "title": "Snippet for the create_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy.", + "file": "data_taxonomy_service/create_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "CreateDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync", + "title": "Snippet for the update_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy.", + "file": "data_taxonomy_service/update_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "UpdateDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync", + "title": "Snippet for the delete_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy.", + "file": "data_taxonomy_service/delete_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "DeleteDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync", + "title": "Snippet for the list_data_taxonomies call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies.", + "file": "data_taxonomy_service/list_data_taxonomies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_taxonomies", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "ListDataTaxonomies", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync", + "title": "Snippet for the get_data_taxonomy call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy.", + "file": "data_taxonomy_service/get_data_taxonomy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_taxonomy", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataTaxonomy", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "GetDataTaxonomy", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync", + "title": "Snippet for the create_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding.", + "file": "data_taxonomy_service/create_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "CreateDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync", + "title": "Snippet for the update_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding.", + "file": "data_taxonomy_service/update_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "UpdateDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync", + "title": "Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding.", + "file": "data_taxonomy_service/delete_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "DeleteDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync", + "title": "Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings.", + "file": "data_taxonomy_service/list_data_attribute_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_attribute_bindings", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "ListDataAttributeBindings", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync", + "title": "Snippet for the get_data_attribute_binding call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding.", + "file": "data_taxonomy_service/get_data_attribute_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_attribute_binding", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataAttributeBinding", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "GetDataAttributeBinding", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync", + "title": "Snippet for the create_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute.", + "file": "data_taxonomy_service/create_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "CreateDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync", + "title": "Snippet for the update_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute.", + "file": "data_taxonomy_service/update_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "UpdateDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync", + "title": "Snippet for the delete_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute.", + "file": "data_taxonomy_service/delete_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "DeleteDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync", + "title": "Snippet for the list_data_attributes call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes.", + "file": "data_taxonomy_service/list_data_attributes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_attributes", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataAttributesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributesResponse", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "ListDataAttributes", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync", + "title": "Snippet for the get_data_attribute call in the DataTaxonomyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute.", + "file": "data_taxonomy_service/get_data_attribute.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_attribute", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataAttribute", + "client": { + "short_name": "DataTaxonomyService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" + }, + "method": { + "short_name": "GetDataAttribute", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", + "service": { + "short_name": "DataTaxonomyService", + "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_CreateDataScan_sync", + "title": "Snippet for the create_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan.", + "file": "data_scan_service/create_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "CreateDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_UpdateDataScan_sync", + "title": "Snippet for the update_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan.", + "file": "data_scan_service/update_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "UpdateDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_DeleteDataScan_sync", + "title": "Snippet for the delete_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan.", + "file": "data_scan_service/delete_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "DeleteDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_GetDataScan_sync", + "title": "Snippet for the get_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan.", + "file": "data_scan_service/get_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataScan", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "GetDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_ListDataScans_sync", + "title": "Snippet for the list_data_scans call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans.", + "file": "data_scan_service/list_data_scans.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_scans", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataScansRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataScansResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "ListDataScans", + "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScans", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_RunDataScan_sync", + "title": "Snippet for the run_data_scan call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan.", + "file": "data_scan_service/run_data_scan.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_data_scan", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::RunDataScanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::RunDataScanResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "RunDataScan", + "full_name": "google.cloud.dataplex.v1.DataScanService.RunDataScan", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_GetDataScanJob_sync", + "title": "Snippet for the get_data_scan_job call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job.", + "file": "data_scan_service/get_data_scan_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_scan_job", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetDataScanJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::DataScanJob", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "GetDataScanJob", + "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_ListDataScanJobs_sync", + "title": "Snippet for the list_data_scan_jobs call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs.", + "file": "data_scan_service/list_data_scan_jobs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_scan_jobs", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "ListDataScanJobs", + "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync", + "title": "Snippet for the generate_data_quality_rules call in the DataScanService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules.", + "file": "data_scan_service/generate_data_quality_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_data_quality_rules", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse", + "client": { + "short_name": "DataScanService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" + }, + "method": { + "short_name": "GenerateDataQualityRules", + "full_name": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", + "service": { + "short_name": "DataScanService", + "full_name": "google.cloud.dataplex.v1.DataScanService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_CreateEntity_sync", + "title": "Snippet for the create_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity.", + "file": "metadata_service/create_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreateEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entity", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "CreateEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.CreateEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_UpdateEntity_sync", + "title": "Snippet for the update_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity.", + "file": "metadata_service/update_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::UpdateEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entity", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "UpdateEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_DeleteEntity_sync", + "title": "Snippet for the delete_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity.", + "file": "metadata_service/delete_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeleteEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "DeleteEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_GetEntity_sync", + "title": "Snippet for the get_entity call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity.", + "file": "metadata_service/get_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entity", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Entity", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "GetEntity", + "full_name": "google.cloud.dataplex.v1.MetadataService.GetEntity", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_ListEntities_sync", + "title": "Snippet for the list_entities call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities.", + "file": "metadata_service/list_entities.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entities", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListEntitiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListEntitiesResponse", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "ListEntities", + "full_name": "google.cloud.dataplex.v1.MetadataService.ListEntities", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_CreatePartition_sync", + "title": "Snippet for the create_partition call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition.", + "file": "metadata_service/create_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_partition", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::CreatePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Partition", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "CreatePartition", + "full_name": "google.cloud.dataplex.v1.MetadataService.CreatePartition", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_DeletePartition_sync", + "title": "Snippet for the delete_partition call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition.", + "file": "metadata_service/delete_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_partition", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::DeletePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "DeletePartition", + "full_name": "google.cloud.dataplex.v1.MetadataService.DeletePartition", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_GetPartition_sync", + "title": "Snippet for the get_partition call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition.", + "file": "metadata_service/get_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_partition", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::GetPartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::Partition", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "GetPartition", + "full_name": "google.cloud.dataplex.v1.MetadataService.GetPartition", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataplex_v1_generated_MetadataService_ListPartitions_sync", + "title": "Snippet for the list_partitions call in the MetadataService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions.", + "file": "metadata_service/list_partitions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_partitions", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataplex::V1::ListPartitionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataplex::V1::ListPartitionsResponse", + "client": { + "short_name": "MetadataService::Client", + "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" + }, + "method": { + "short_name": "ListPartitions", + "full_name": "google.cloud.dataplex.v1.MetadataService.ListPartitions", + "service": { + "short_name": "MetadataService", + "full_name": "google.cloud.dataplex.v1.MetadataService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_operations_test.rb new file mode 100644 index 000000000000..841d4ff458a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_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/business_glossary_pb" +require "google/cloud/dataplex/v1/business_glossary_services_pb" +require "google/cloud/dataplex/v1/business_glossary_service" + +class ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_paths_test.rb new file mode 100644 index 000000000000..ff635ded7712 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_paths_test.rb @@ -0,0 +1,91 @@ +# 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/business_glossary_service" + +class ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_glossary_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::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.glossary_path project: "value0", location: "value1", glossary: "value2" + assert_equal "projects/value0/locations/value1/glossaries/value2", path + end + end + + def test_glossary_category_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::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.glossary_category_path project: "value0", location: "value1", glossary: "value2", glossary_category: "value3" + assert_equal "projects/value0/locations/value1/glossaries/value2/categories/value3", path + end + end + + def test_glossary_term_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::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.glossary_term_path project: "value0", location: "value1", glossary: "value2", glossary_term: "value3" + assert_equal "projects/value0/locations/value1/glossaries/value2/terms/value3", 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::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_rest_test.rb new file mode 100644 index 000000000000..b3ea495183e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_rest_test.rb @@ -0,0 +1,933 @@ +# 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/business_glossary_pb" +require "google/cloud/dataplex/v1/business_glossary_service/rest" + + +class ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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_glossary + # 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" + glossary_id = "hello world" + glossary = {} + validate_only = true + + create_glossary_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_create_glossary_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_glossary_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_glossary({ parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_glossary parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_glossary ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new(parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_glossary({ parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_glossary(::Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new(parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_glossary_client_stub.call_count + end + end + end + + def test_update_glossary + # 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. + glossary = {} + update_mask = {} + validate_only = true + + update_glossary_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_update_glossary_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_glossary_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_glossary({ glossary: glossary, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_glossary glossary: glossary, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_glossary ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary({ glossary: glossary, 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_glossary(::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary_client_stub.call_count + end + end + end + + def test_delete_glossary + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_glossary_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_delete_glossary_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_glossary_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_glossary({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_glossary name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_glossary ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_glossary({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_glossary(::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_glossary_client_stub.call_count + end + end + end + + def test_get_glossary + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Glossary.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_glossary_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_get_glossary_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_glossary_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_glossary({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_glossary name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_glossary ::Google::Cloud::Dataplex::V1::GetGlossaryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_glossary({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_glossary(::Google::Cloud::Dataplex::V1::GetGlossaryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_glossary_client_stub.call_count + end + end + end + + def test_list_glossaries + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListGlossariesResponse.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_glossaries_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_list_glossaries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_glossaries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_glossaries({ 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_glossaries 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_glossaries ::Google::Cloud::Dataplex::V1::ListGlossariesRequest.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_glossaries({ 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_glossaries(::Google::Cloud::Dataplex::V1::ListGlossariesRequest.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_glossaries_client_stub.call_count + end + end + end + + def test_create_glossary_category + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + category_id = "hello world" + category = {} + + create_glossary_category_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_create_glossary_category_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_glossary_category_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_glossary_category({ parent: parent, category_id: category_id, category: category }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_glossary_category parent: parent, category_id: category_id, category: category do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_glossary_category ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new(parent: parent, category_id: category_id, category: category) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_glossary_category({ parent: parent, category_id: category_id, category: category }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_glossary_category(::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new(parent: parent, category_id: category_id, category: category), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_glossary_category_client_stub.call_count + end + end + end + + def test_update_glossary_category + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + category = {} + update_mask = {} + + update_glossary_category_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_update_glossary_category_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_glossary_category_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_glossary_category({ category: category, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_glossary_category category: category, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_glossary_category ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new(category: category, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_glossary_category({ category: category, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_glossary_category(::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new(category: category, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_glossary_category_client_stub.call_count + end + end + end + + def test_delete_glossary_category + # 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_glossary_category_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_delete_glossary_category_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_glossary_category_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_glossary_category({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_glossary_category name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_glossary_category ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_glossary_category({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_glossary_category(::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_glossary_category_client_stub.call_count + end + end + end + + def test_get_glossary_category + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_glossary_category_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_get_glossary_category_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_glossary_category_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_glossary_category({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_glossary_category name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_glossary_category ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_glossary_category({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_glossary_category(::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_glossary_category_client_stub.call_count + end + end + end + + def test_list_glossary_categories + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse.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_glossary_categories_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_list_glossary_categories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_glossary_categories_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_glossary_categories({ 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_glossary_categories 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_glossary_categories ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.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_glossary_categories({ 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_glossary_categories(::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.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_glossary_categories_client_stub.call_count + end + end + end + + def test_create_glossary_term + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + term_id = "hello world" + term = {} + + create_glossary_term_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_create_glossary_term_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_glossary_term_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_glossary_term({ parent: parent, term_id: term_id, term: term }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_glossary_term parent: parent, term_id: term_id, term: term do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_glossary_term ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new(parent: parent, term_id: term_id, term: term) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_glossary_term({ parent: parent, term_id: term_id, term: term }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_glossary_term(::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new(parent: parent, term_id: term_id, term: term), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_glossary_term_client_stub.call_count + end + end + end + + def test_update_glossary_term + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + term = {} + update_mask = {} + + update_glossary_term_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_update_glossary_term_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_glossary_term_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_glossary_term({ term: term, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_glossary_term term: term, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_glossary_term ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new(term: term, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_glossary_term({ term: term, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_glossary_term(::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new(term: term, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_glossary_term_client_stub.call_count + end + end + end + + def test_delete_glossary_term + # 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_glossary_term_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_delete_glossary_term_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_glossary_term_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_glossary_term({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_glossary_term name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_glossary_term ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_glossary_term({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_glossary_term(::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_glossary_term_client_stub.call_count + end + end + end + + def test_get_glossary_term + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_glossary_term_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_get_glossary_term_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_glossary_term_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_glossary_term({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_glossary_term name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_glossary_term ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_glossary_term({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_glossary_term(::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_glossary_term_client_stub.call_count + end + end + end + + def test_list_glossary_terms + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse.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_glossary_terms_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_list_glossary_terms_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_glossary_terms_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_glossary_terms({ 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_glossary_terms 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_glossary_terms ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.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_glossary_terms({ 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_glossary_terms(::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.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_glossary_terms_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::BusinessGlossaryService::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::BusinessGlossaryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_test.rb new file mode 100644 index 000000000000..d8d745e39fc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_test.rb @@ -0,0 +1,1066 @@ +# 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/business_glossary_pb" +require "google/cloud/dataplex/v1/business_glossary_service" + +class ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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_glossary + # 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" + glossary_id = "hello world" + glossary = {} + validate_only = true + + create_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_glossary, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["glossary_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Glossary), request["glossary"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_glossary_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_glossary({ parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_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_glossary parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_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_glossary ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new(parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_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_glossary({ parent: parent, glossary_id: glossary_id, glossary: glossary, 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_glossary(::Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new(parent: parent, glossary_id: glossary_id, glossary: glossary, 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_glossary_client_stub.call_rpc_count + end + end + + def test_update_glossary + # 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. + glossary = {} + update_mask = {} + validate_only = true + + update_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_glossary, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Glossary), request["glossary"] + 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_glossary_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_glossary({ glossary: glossary, 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_glossary glossary: glossary, 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_glossary ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary({ glossary: glossary, 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_glossary(::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary_client_stub.call_rpc_count + end + end + + def test_delete_glossary + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_glossary, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_glossary_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_glossary({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_glossary name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_glossary ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_glossary({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_glossary(::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_glossary_client_stub.call_rpc_count + end + end + + def test_get_glossary + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Glossary.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_glossary, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetGlossaryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_glossary_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_glossary({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_glossary name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_glossary ::Google::Cloud::Dataplex::V1::GetGlossaryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_glossary({ 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_glossary(::Google::Cloud::Dataplex::V1::GetGlossaryRequest.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_glossary_client_stub.call_rpc_count + end + end + + def test_list_glossaries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListGlossariesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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_glossaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_glossaries, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListGlossariesRequest, 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_glossaries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_glossaries({ 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_glossaries 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_glossaries ::Google::Cloud::Dataplex::V1::ListGlossariesRequest.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_glossaries({ 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_glossaries(::Google::Cloud::Dataplex::V1::ListGlossariesRequest.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_glossaries_client_stub.call_rpc_count + end + end + + def test_create_glossary_category + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new + grpc_operation = GRPC::ActiveCall::Operation.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" + category_id = "hello world" + category = {} + + create_glossary_category_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_glossary_category, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["category_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::GlossaryCategory), request["category"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_glossary_category_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_glossary_category({ parent: parent, category_id: category_id, category: category }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_glossary_category parent: parent, category_id: category_id, category: category do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_glossary_category ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new(parent: parent, category_id: category_id, category: category) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_glossary_category({ parent: parent, category_id: category_id, category: category }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_glossary_category(::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new(parent: parent, category_id: category_id, category: category), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_glossary_category_client_stub.call_rpc_count + end + end + + def test_update_glossary_category + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + category = {} + update_mask = {} + + update_glossary_category_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_glossary_category, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::GlossaryCategory), request["category"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_glossary_category_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_glossary_category({ category: category, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_glossary_category category: category, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_glossary_category ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new(category: category, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_glossary_category({ category: category, 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.update_glossary_category(::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new(category: category, 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, update_glossary_category_client_stub.call_rpc_count + end + end + + def test_delete_glossary_category + # 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_glossary_category_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_glossary_category, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_glossary_category_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_glossary_category({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_glossary_category name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_glossary_category ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_glossary_category({ 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_glossary_category(::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.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_glossary_category_client_stub.call_rpc_count + end + end + + def test_get_glossary_category + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_glossary_category_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_glossary_category, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_glossary_category_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_glossary_category({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_glossary_category name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_glossary_category ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_glossary_category({ 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_glossary_category(::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.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_glossary_category_client_stub.call_rpc_count + end + end + + def test_list_glossary_categories + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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_glossary_categories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_glossary_categories, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, 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_glossary_categories_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_glossary_categories({ 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_glossary_categories 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_glossary_categories ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.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_glossary_categories({ 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_glossary_categories(::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.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_glossary_categories_client_stub.call_rpc_count + end + end + + def test_create_glossary_term + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new + grpc_operation = GRPC::ActiveCall::Operation.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" + term_id = "hello world" + term = {} + + create_glossary_term_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_glossary_term, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["term_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::GlossaryTerm), request["term"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_glossary_term_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_glossary_term({ parent: parent, term_id: term_id, term: term }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_glossary_term parent: parent, term_id: term_id, term: term do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_glossary_term ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new(parent: parent, term_id: term_id, term: term) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_glossary_term({ parent: parent, term_id: term_id, term: term }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_glossary_term(::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new(parent: parent, term_id: term_id, term: term), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_glossary_term_client_stub.call_rpc_count + end + end + + def test_update_glossary_term + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + term = {} + update_mask = {} + + update_glossary_term_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_glossary_term, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::GlossaryTerm), request["term"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_glossary_term_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_glossary_term({ term: term, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_glossary_term term: term, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_glossary_term ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new(term: term, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_glossary_term({ term: term, 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.update_glossary_term(::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new(term: term, 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, update_glossary_term_client_stub.call_rpc_count + end + end + + def test_delete_glossary_term + # 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_glossary_term_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_glossary_term, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_glossary_term_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_glossary_term({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_glossary_term name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_glossary_term ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_glossary_term({ 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_glossary_term(::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.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_glossary_term_client_stub.call_rpc_count + end + end + + def test_get_glossary_term + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_glossary_term_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_glossary_term, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_glossary_term_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_glossary_term({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_glossary_term name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_glossary_term ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_glossary_term({ 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_glossary_term(::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.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_glossary_term_client_stub.call_rpc_count + end + end + + def test_list_glossary_terms + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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_glossary_terms_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_glossary_terms, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, 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_glossary_terms_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_glossary_terms({ 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_glossary_terms 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_glossary_terms ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.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_glossary_terms({ 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_glossary_terms(::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.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_glossary_terms_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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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::BusinessGlossaryService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb new file mode 100644 index 000000000000..dabe8edd2134 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_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/catalog_pb" +require "google/cloud/dataplex/v1/catalog_services_pb" +require "google/cloud/dataplex/v1/catalog_service" + +class ::Google::Cloud::Dataplex::V1::CatalogService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + 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::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, 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::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb new file mode 100644 index 000000000000..04c15003fadc --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb @@ -0,0 +1,163 @@ +# 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/catalog_service" + +class ::Google::Cloud::Dataplex::V1::CatalogService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_aspect_type_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.aspect_type_path project: "value0", location: "value1", aspect_type: "value2" + assert_equal "projects/value0/locations/value1/aspectTypes/value2", path + end + end + + def test_entry_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_path project: "value0", location: "value1", entry_group: "value2", entry: "value3" + assert_equal "projects/value0/locations/value1/entryGroups/value2/entries/value3", path + end + end + + def test_entry_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_group_path project: "value0", location: "value1", entry_group: "value2" + assert_equal "projects/value0/locations/value1/entryGroups/value2", path + end + end + + def test_entry_link_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_link_path project: "value0", location: "value1", entry_group: "value2", entry_link: "value3" + assert_equal "projects/value0/locations/value1/entryGroups/value2/entryLinks/value3", path + end + end + + def test_entry_type_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entry_type_path project: "value0", location: "value1", entry_type: "value2" + assert_equal "projects/value0/locations/value1/entryTypes/value2", path + end + end + + def test_glossary_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.glossary_path project: "value0", location: "value1", glossary: "value2" + assert_equal "projects/value0/locations/value1/glossaries/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + 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 + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.metadata_job_path project: "value0", location: "value1", metadata_job: "value2" + assert_equal "projects/value0/locations/value1/metadataJobs/value2", path + end + end + + def test_project_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.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb new file mode 100644 index 000000000000..e3b7296a2ee4 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb @@ -0,0 +1,2176 @@ +# 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/catalog_pb" +require "google/cloud/dataplex/v1/catalog_service/rest" + + +class ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, 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_entry_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_type_id = "hello world" + entry_type = {} + validate_only = true + + create_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_type_client_stub.call_count + end + end + end + + def test_update_entry_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry_type = {} + update_mask = {} + validate_only = true + + update_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entry_type_client_stub.call_count + end + end + end + + def test_delete_entry_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entry_type({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry_type name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry_type({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_type_client_stub.call_count + end + end + end + + def test_list_entry_types + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_types_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entry_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entry_types_client_stub.call_count + end + end + end + + def test_get_entry_type + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::EntryType.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entry_type({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry_type name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry_type({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_type_client_stub.call_count + end + end + end + + def test_create_aspect_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + aspect_type_id = "hello world" + aspect_type = {} + validate_only = true + + create_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_aspect_type_client_stub.call_count + end + end + end + + def test_update_aspect_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + aspect_type = {} + update_mask = {} + validate_only = true + + update_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_aspect_type_client_stub.call_count + end + end + end + + def test_delete_aspect_type + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_aspect_type({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_aspect_type name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_aspect_type({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_aspect_type_client_stub.call_count + end + end + end + + def test_list_aspect_types + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_aspect_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_types_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_aspect_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_aspect_types_client_stub.call_count + end + end + end + + def test_get_aspect_type + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::AspectType.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_type_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_aspect_type({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_aspect_type name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_aspect_type({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_aspect_type_client_stub.call_count + end + end + end + + def test_create_entry_group + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_group_id = "hello world" + entry_group = {} + validate_only = true + + create_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_group_client_stub.call_count + end + end + end + + def test_update_entry_group + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry_group = {} + update_mask = {} + validate_only = true + + update_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entry_group_client_stub.call_count + end + end + end + + def test_delete_entry_group + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entry_group({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry_group name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry_group({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_group_client_stub.call_count + end + end + end + + def test_list_entry_groups + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entry_groups_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entry_groups_client_stub.call_count + end + end + end + + def test_get_entry_group + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::EntryGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entry_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_group_client_stub.call_count + end + end + end + + def test_create_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_id = "hello world" + entry = {} + + create_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry parent: parent, entry_id: entry_id, entry: entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_client_stub.call_count + end + end + end + + def test_update_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entry = {} + update_mask = {} + allow_missing = true + delete_missing_aspects = true + aspect_keys = ["hello world"] + + update_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entry_client_stub.call_count + end + end + end + + def test_delete_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_client_stub.call_count + end + end + end + + def test_list_entries + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entries_client_stub.call_count + end + end + end + + def test_get_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + + get_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_client_stub.call_count + end + end + end + + def test_lookup_entry + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + entry = "hello world" + + lookup_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_entry_client_stub.call_count + end + end + end + + def test_search_entries + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + scope = "hello world" + semantic_search = true + + search_entries_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_search_entries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_entries_client_stub.call_count + end + end + end + + def test_create_metadata_job + # 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_job = {} + metadata_job_id = "hello world" + validate_only = true + + create_metadata_job_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_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_metadata_job_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_job({ parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_metadata_job parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_metadata_job ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest.new(parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_metadata_job({ parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job(::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest.new(parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job_client_stub.call_count + end + end + end + + def test_get_metadata_job + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::MetadataJob.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_metadata_job_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_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_metadata_job_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_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_metadata_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_metadata_job ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_metadata_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_metadata_job(::Google::Cloud::Dataplex::V1::GetMetadataJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_metadata_job_client_stub.call_count + end + end + end + + def test_list_metadata_jobs + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse.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_jobs_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_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_metadata_jobs_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_jobs({ 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_jobs 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_jobs ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest.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_jobs({ 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_jobs(::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest.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_jobs_client_stub.call_count + end + end + end + + def test_cancel_metadata_job + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_metadata_job_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_cancel_metadata_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_metadata_job_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.cancel_metadata_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_metadata_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_metadata_job ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_metadata_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_metadata_job(::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_metadata_job_client_stub.call_count + end + end + end + + def test_create_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. + parent = "hello world" + entry_link_id = "hello world" + entry_link = {} + + create_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_create_entry_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_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.create_entry_link({ parent: parent, entry_link_id: entry_link_id, entry_link: entry_link }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entry_link parent: parent, entry_link_id: entry_link_id, entry_link: entry_link do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entry_link ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest.new(parent: parent, entry_link_id: entry_link_id, entry_link: entry_link) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entry_link({ parent: parent, entry_link_id: entry_link_id, entry_link: entry_link }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entry_link(::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest.new(parent: parent, entry_link_id: entry_link_id, entry_link: entry_link), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entry_link_client_stub.call_count + end + 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 + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_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_delete_entry_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_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.delete_entry_link({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entry_link name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entry_link ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entry_link({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entry_link(::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entry_link_client_stub.call_count + end + 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 + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_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_get_entry_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_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.get_entry_link({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entry_link name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entry_link ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entry_link({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entry_link(::Google::Cloud::Dataplex::V1::GetEntryLinkRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entry_link_client_stub.call_count + end + 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 + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb new file mode 100644 index 000000000000..27d68afdc9f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb @@ -0,0 +1,2527 @@ +# 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/catalog_pb" +require "google/cloud/dataplex/v1/catalog_service" + +class ::Google::Cloud::Dataplex::V1::CatalogService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + 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_entry_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_type_id = "hello world" + entry_type = {} + validate_only = true + + create_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_type_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_type_client_stub.call_rpc_count + end + end + + def test_update_entry_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entry_type = {} + update_mask = {} + validate_only = true + + update_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entry_type_client_stub.call_rpc_count + end + end + + def test_delete_entry_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entry_type({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry_type name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry_type({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_type_client_stub.call_rpc_count + end + end + + def test_list_entry_types + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entry_types, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entry_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entry_types_client_stub.call_rpc_count + end + end + + def test_get_entry_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::EntryType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entry_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entry_type({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry_type name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry_type({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_type_client_stub.call_rpc_count + end + end + + def test_create_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + aspect_type_id = "hello world" + aspect_type = {} + validate_only = true + + create_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["aspect_type_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_aspect_type_client_stub.call_rpc_count + end + end + + def test_update_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + aspect_type = {} + update_mask = {} + validate_only = true + + update_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_aspect_type_client_stub.call_rpc_count + end + end + + def test_delete_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_aspect_type({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_aspect_type name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_aspect_type({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_aspect_type_client_stub.call_rpc_count + end + end + + def test_list_aspect_types + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_aspect_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_aspect_types, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_aspect_types_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_aspect_types_client_stub.call_rpc_count + end + end + + def test_get_aspect_type + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::AspectType.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_aspect_type, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_aspect_type_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_aspect_type({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_aspect_type name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_aspect_type({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_aspect_type_client_stub.call_rpc_count + end + end + + def test_create_entry_group + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_group_id = "hello world" + entry_group = {} + validate_only = true + + create_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_group_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_group_client_stub.call_rpc_count + end + end + + def test_update_entry_group + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entry_group = {} + update_mask = {} + validate_only = true + + update_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entry_group_client_stub.call_rpc_count + end + end + + def test_delete_entry_group + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entry_group({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry_group name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry_group({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_group_client_stub.call_rpc_count + end + end + + def test_list_entry_groups + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_entry_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entry_groups, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entry_groups_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entry_groups_client_stub.call_rpc_count + end + end + + def test_get_entry_group + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::EntryGroup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry_group, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entry_group_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entry_group({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry_group name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry_group({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_group_client_stub.call_rpc_count + end + end + + def test_create_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entry_id = "hello world" + entry = {} + + create_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry parent: parent, entry_id: entry_id, entry: entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_client_stub.call_rpc_count + end + end + + def test_update_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entry = {} + update_mask = {} + allow_missing = true + delete_missing_aspects = true + aspect_keys = ["hello world"] + + update_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + assert_equal true, request["delete_missing_aspects"] + assert_equal ["hello world"], request["aspect_keys"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entry_client_stub.call_rpc_count + end + end + + def test_delete_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entry({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_client_stub.call_rpc_count + end + end + + def test_list_entries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entries, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entries_client_stub.call_rpc_count + end + end + + def test_get_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + + get_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryRequest, request + assert_equal "hello world", request["name"] + assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] + assert_equal ["hello world"], request["aspect_types"] + assert_equal ["hello world"], request["paths"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_client_stub.call_rpc_count + end + end + + def test_lookup_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTRY_VIEW_UNSPECIFIED + aspect_types = ["hello world"] + paths = ["hello world"] + entry = "hello world" + + lookup_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_entry, name + assert_kind_of ::Google::Cloud::Dataplex::V1::LookupEntryRequest, request + assert_equal "hello world", request["name"] + assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] + assert_equal ["hello world"], request["aspect_types"] + assert_equal ["hello world"], request["paths"] + assert_equal "hello world", request["entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_entry_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_entry_client_stub.call_rpc_count + end + end + + def test_search_entries + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + scope = "hello world" + semantic_search = true + + search_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_entries, name + assert_kind_of ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["scope"] + assert_equal true, request["semantic_search"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_entries_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_entries_client_stub.call_rpc_count + end + end + + def test_create_metadata_job + # 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_job = {} + metadata_job_id = "hello world" + validate_only = true + + create_metadata_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_metadata_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::MetadataJob), request["metadata_job"] + assert_equal "hello world", request["metadata_job_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_metadata_job_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_job({ parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest.new(parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job({ parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job(::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest.new(parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job_client_stub.call_rpc_count + end + end + + def test_get_metadata_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::MetadataJob.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_metadata_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_metadata_job_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_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_metadata_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_metadata_job ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest.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_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_metadata_job(::Google::Cloud::Dataplex::V1::GetMetadataJobRequest.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_job_client_stub.call_rpc_count + end + end + + def test_list_metadata_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_metadata_jobs, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, 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_jobs_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_jobs({ 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_jobs 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_jobs ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest.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_jobs({ 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_jobs(::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest.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_jobs_client_stub.call_rpc_count + end + end + + def test_cancel_metadata_job + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_metadata_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_metadata_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_metadata_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_metadata_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_metadata_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_metadata_job ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_metadata_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_metadata_job(::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.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_metadata_job_client_stub.call_rpc_count + end + end + + def test_create_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. + parent = "hello world" + entry_link_id = "hello world" + entry_link = {} + + create_entry_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entry_link, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["entry_link_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryLink), request["entry_link"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_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.create_entry_link({ parent: parent, entry_link_id: entry_link_id, entry_link: entry_link }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entry_link parent: parent, entry_link_id: entry_link_id, entry_link: entry_link do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entry_link ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest.new(parent: parent, entry_link_id: entry_link_id, entry_link: entry_link) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entry_link({ parent: parent, entry_link_id: entry_link_id, entry_link: entry_link }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entry_link(::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest.new(parent: parent, entry_link_id: entry_link_id, entry_link: entry_link), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entry_link_client_stub.call_rpc_count + 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 + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_entry_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entry_link, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_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.delete_entry_link({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entry_link name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entry_link ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entry_link({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entry_link(::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entry_link_client_stub.call_rpc_count + 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 + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entry_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entry_link, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_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.get_entry_link({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entry_link name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entry_link ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entry_link({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entry_link(::Google::Cloud::Dataplex::V1::GetEntryLinkRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entry_link_client_stub.call_rpc_count + 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 + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration, config + end + + def test_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::CatalogService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::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::CatalogService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_operations_test.rb new file mode 100644 index 000000000000..5d8641c9aa46 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_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/cmek_pb" +require "google/cloud/dataplex/v1/cmek_services_pb" +require "google/cloud/dataplex/v1/cmek_service" + +class ::Google::Cloud::Dataplex::V1::CmekService::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::CmekService::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::CmekService::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::CmekService::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::CmekService::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::CmekService::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::CmekService::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::CmekService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_paths_test.rb new file mode 100644 index 000000000000..589bea6a44ab --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_paths_test.rb @@ -0,0 +1,67 @@ +# 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/cmek_service" + +class ::Google::Cloud::Dataplex::V1::CmekService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_encryption_config_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::CmekService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.encryption_config_path organization: "value0", location: "value1", encryption_config: "value2" + assert_equal "organizations/value0/locations/value1/encryptionConfigs/value2", path + end + end + + def test_organization_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::CmekService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_rest_test.rb new file mode 100644 index 000000000000..c2df6816f348 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_rest_test.rb @@ -0,0 +1,377 @@ +# 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/cmek_pb" +require "google/cloud/dataplex/v1/cmek_service/rest" + + +class ::Google::Cloud::Dataplex::V1::CmekService::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_encryption_config + # 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" + encryption_config_id = "hello world" + encryption_config = {} + + create_encryption_config_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::CmekService::Rest::ServiceStub.stub :transcode_create_encryption_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_encryption_config_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_encryption_config({ parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_encryption_config parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_encryption_config ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new(parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_encryption_config({ parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_encryption_config(::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new(parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_encryption_config_client_stub.call_count + end + end + end + + def test_update_encryption_config + # 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. + encryption_config = {} + update_mask = {} + + update_encryption_config_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::CmekService::Rest::ServiceStub.stub :transcode_update_encryption_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_encryption_config_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_encryption_config({ encryption_config: encryption_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_encryption_config encryption_config: encryption_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_encryption_config ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new(encryption_config: encryption_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_encryption_config({ encryption_config: encryption_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_encryption_config(::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new(encryption_config: encryption_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_encryption_config_client_stub.call_count + end + end + end + + def test_delete_encryption_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_encryption_config_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::CmekService::Rest::ServiceStub.stub :transcode_delete_encryption_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_encryption_config_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_encryption_config({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_encryption_config name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_encryption_config ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_encryption_config({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_encryption_config(::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_encryption_config_client_stub.call_count + end + end + end + + def test_list_encryption_configs + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse.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_encryption_configs_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::CmekService::Rest::ServiceStub.stub :transcode_list_encryption_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_encryption_configs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_encryption_configs({ 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_encryption_configs 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_encryption_configs ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.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_encryption_configs({ 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_encryption_configs(::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.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_encryption_configs_client_stub.call_count + end + end + end + + def test_get_encryption_config + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::EncryptionConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_encryption_config_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::CmekService::Rest::ServiceStub.stub :transcode_get_encryption_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_encryption_config_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_encryption_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_encryption_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_encryption_config ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_encryption_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_encryption_config(::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_encryption_config_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::CmekService::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::CmekService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb new file mode 100644 index 000000000000..33eabc1f527a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb @@ -0,0 +1,444 @@ +# 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/cmek_pb" +require "google/cloud/dataplex/v1/cmek_service" + +class ::Google::Cloud::Dataplex::V1::CmekService::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_encryption_config + # 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" + encryption_config_id = "hello world" + encryption_config = {} + + create_encryption_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_encryption_config, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["encryption_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EncryptionConfig), request["encryption_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_encryption_config_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_encryption_config({ parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config }) 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_encryption_config parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config do |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_encryption_config ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new(parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config) 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_encryption_config({ parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config }, 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_encryption_config(::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new(parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config), 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_encryption_config_client_stub.call_rpc_count + end + end + + def test_update_encryption_config + # 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. + encryption_config = {} + update_mask = {} + + update_encryption_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_encryption_config, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EncryptionConfig), request["encryption_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_encryption_config_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_encryption_config({ encryption_config: encryption_config, update_mask: update_mask }) 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_encryption_config encryption_config: encryption_config, update_mask: update_mask do |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_encryption_config ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new(encryption_config: encryption_config, update_mask: update_mask) 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_encryption_config({ encryption_config: encryption_config, update_mask: update_mask }, 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_encryption_config(::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new(encryption_config: encryption_config, update_mask: update_mask), 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_encryption_config_client_stub.call_rpc_count + end + end + + def test_delete_encryption_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_encryption_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_encryption_config, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_encryption_config_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_encryption_config({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_encryption_config name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_encryption_config ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_encryption_config({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_encryption_config(::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_encryption_config_client_stub.call_rpc_count + end + end + + def test_list_encryption_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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_encryption_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_encryption_configs, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest, 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_encryption_configs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_encryption_configs({ 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_encryption_configs 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_encryption_configs ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.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_encryption_configs({ 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_encryption_configs(::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.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_encryption_configs_client_stub.call_rpc_count + end + end + + def test_get_encryption_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::EncryptionConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_encryption_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_encryption_config, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_encryption_config_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_encryption_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_encryption_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_encryption_config ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_encryption_config({ 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_encryption_config(::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.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_encryption_config_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::CmekService::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::CmekService::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::CmekService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Dataplex::V1::CmekService::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::CmekService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::CmekService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb new file mode 100644 index 000000000000..adb187b5bcca --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb @@ -0,0 +1,104 @@ +# 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/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_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/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_operations_test.rb b/owl-bot-staging/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/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb new file mode 100644 index 000000000000..e2e06391621a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb @@ -0,0 +1,79 @@ +# 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_product_service" + +class ::Google::Cloud::Dataplex::V1::DataProductService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + 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::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + 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_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::DataProductService::Client.new do |config| + config.credentials = grpc_channel + end + + 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/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_rest_test.rb b/owl-bot-staging/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/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_test.rb new file mode 100644 index 000000000000..6fdd458e5bfa --- /dev/null +++ b/owl-bot-staging/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/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb new file mode 100644 index 000000000000..a3c160d4de51 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_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/datascans_pb" +require "google/cloud/dataplex/v1/datascans_services_pb" +require "google/cloud/dataplex/v1/data_scan_service" + +class ::Google::Cloud::Dataplex::V1::DataScanService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + 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::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, 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::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb new file mode 100644 index 000000000000..92a049f88e9a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb @@ -0,0 +1,127 @@ +# 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_scan_service" + +class ::Google::Cloud::Dataplex::V1::DataScanService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_connection_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.connection_path project: "value0", location: "value1", connection: "value2" + assert_equal "projects/value0/locations/value1/connections/value2", path + end + end + + def test_data_scan_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_scan_path project: "value0", location: "value1", data_scan: "value2" + assert_equal "projects/value0/locations/value1/dataScans/value2", path + end + end + + def test_data_scan_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_scan_job_path project: "value0", location: "value1", data_scan: "value2", job: "value3" + assert_equal "projects/value0/locations/value1/dataScans/value2/jobs/value3", path + end + end + + def test_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", dataset: "value1" + assert_equal "projects/value0/datasets/value1", path + end + end + + def test_entity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb new file mode 100644 index 000000000000..b87cf83d9aa7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb @@ -0,0 +1,600 @@ +# 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/datascans_pb" +require "google/cloud/dataplex/v1/data_scan_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, 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_scan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_scan = {} + data_scan_id = "hello world" + validate_only = true + + create_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_create_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_scan_client_stub.call_count + end + end + end + + def test_update_data_scan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_scan = {} + update_mask = {} + validate_only = true + + update_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_update_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_scan_client_stub.call_count + end + end + end + + def test_delete_data_scan + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_data_scan_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::DataScanService::Rest::ServiceStub.stub :transcode_delete_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_scan({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_scan name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_scan({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_scan_client_stub.call_count + end + end + end + + def test_get_data_scan + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataScan.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_VIEW_UNSPECIFIED + + get_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_scan({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_scan name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_scan({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_scan_client_stub.call_count + end + end + end + + def test_list_data_scans + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_scans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scans_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_scans_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_scans_client_stub.call_count + end + end + end + + def test_run_data_scan + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + run_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_run_data_scan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_data_scan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_data_scan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_data_scan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_data_scan_client_stub.call_count + end + end + end + + def test_get_data_scan_job + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataScanJob.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED + + get_data_scan_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_scan_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_scan_job({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_scan_job name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_scan_job({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_scan_job_client_stub.call_count + end + end + end + + def test_list_data_scan_jobs + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_scan_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scan_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_scan_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_scan_jobs_client_stub.call_count + end + end + end + + def test_generate_data_quality_rules + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + generate_data_quality_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_generate_data_quality_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_data_quality_rules_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_data_quality_rules({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_data_quality_rules name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_data_quality_rules({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_data_quality_rules_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb new file mode 100644 index 000000000000..680478d5094a --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb @@ -0,0 +1,695 @@ +# 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/datascans_pb" +require "google/cloud/dataplex/v1/data_scan_service" + +class ::Google::Cloud::Dataplex::V1::DataScanService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + 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_scan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_scan = {} + data_scan_id = "hello world" + validate_only = true + + create_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] + assert_equal "hello world", request["data_scan_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_scan_client_stub.call_rpc_count + end + end + + def test_update_data_scan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + data_scan = {} + update_mask = {} + validate_only = true + + update_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_scan_client_stub.call_rpc_count + end + end + + def test_delete_data_scan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_scan({ name: name, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_scan name: name, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_scan({ name: name, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_scan_client_stub.call_rpc_count + end + end + + def test_get_data_scan + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataScan.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_VIEW_UNSPECIFIED + + get_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanRequest, request + assert_equal "hello world", request["name"] + assert_equal :DATA_SCAN_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_scan({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_scan name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_scan({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_scan_client_stub.call_rpc_count + end + end + + def test_list_data_scans + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_scans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_scans, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScansRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_scans_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_scans_client_stub.call_rpc_count + end + end + + def test_run_data_scan + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + run_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_data_scan, name + assert_kind_of ::Google::Cloud::Dataplex::V1::RunDataScanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_data_scan_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_data_scan({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_data_scan name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_data_scan({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_data_scan_client_stub.call_rpc_count + end + end + + def test_get_data_scan_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataScanJob.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED + + get_data_scan_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_scan_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, request + assert_equal "hello world", request["name"] + assert_equal :DATA_SCAN_JOB_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_scan_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_scan_job({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_scan_job name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_scan_job({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_scan_job_client_stub.call_rpc_count + end + end + + def test_list_data_scan_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_scan_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_scan_jobs, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_scan_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_scan_jobs_client_stub.call_rpc_count + end + end + + def test_generate_data_quality_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + generate_data_quality_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_data_quality_rules, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_data_quality_rules_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_data_quality_rules({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_data_quality_rules name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_data_quality_rules({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_data_quality_rules_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration, config + end + + def test_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::DataScanService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::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::DataScanService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb new file mode 100644 index 000000000000..eeea60575eba --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_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_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_services_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service" + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + 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::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, 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::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb new file mode 100644 index 000000000000..227369dc3046 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb @@ -0,0 +1,91 @@ +# 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_taxonomy_service" + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_data_attribute_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_attribute_path project: "value0", location: "value1", data_taxonomy: "value2", data_attribute_id: "value3" + assert_equal "projects/value0/locations/value1/dataTaxonomies/value2/attributes/value3", path + end + end + + def test_data_attribute_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_attribute_binding_path project: "value0", location: "value1", data_attribute_binding_id: "value2" + assert_equal "projects/value0/locations/value1/dataAttributeBindings/value2", path + end + end + + def test_data_taxonomy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_taxonomy_path project: "value0", location: "value1", data_taxonomy_id: "value2" + assert_equal "projects/value0/locations/value1/dataTaxonomies/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb new file mode 100644 index 000000000000..c447e1de96d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb @@ -0,0 +1,939 @@ +# 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_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, 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_taxonomy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_taxonomy_id = "hello world" + data_taxonomy = {} + validate_only = true + + create_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_taxonomy_client_stub.call_count + end + end + end + + def test_update_data_taxonomy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_taxonomy = {} + validate_only = true + + update_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_taxonomy_client_stub.call_count + end + end + end + + def test_delete_data_taxonomy + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_taxonomy({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_taxonomy name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_taxonomy({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_taxonomy_client_stub.call_count + end + end + end + + def test_list_data_taxonomies + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_taxonomies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_taxonomies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_taxonomies_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_taxonomies_client_stub.call_count + end + end + end + + def test_get_data_taxonomy + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_taxonomy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_taxonomy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_taxonomy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_taxonomy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_taxonomy_client_stub.call_count + end + end + end + + def test_create_data_attribute_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_binding_id = "hello world" + data_attribute_binding = {} + validate_only = true + + create_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_attribute_binding_client_stub.call_count + end + end + end + + def test_update_data_attribute_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute_binding = {} + validate_only = true + + update_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_attribute_binding_client_stub.call_count + end + end + end + + def test_delete_data_attribute_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_attribute_binding({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_attribute_binding name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_attribute_binding({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_attribute_binding_client_stub.call_count + end + end + end + + def test_list_data_attribute_bindings + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attribute_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attribute_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_attribute_bindings_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_attribute_bindings_client_stub.call_count + end + end + end + + def test_get_data_attribute_binding + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_attribute_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_attribute_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_attribute_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_attribute_binding_client_stub.call_count + end + end + end + + def test_create_data_attribute + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_id = "hello world" + data_attribute = {} + validate_only = true + + create_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_attribute_client_stub.call_count + end + end + end + + def test_update_data_attribute + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute = {} + validate_only = true + + update_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_attribute_client_stub.call_count + end + end + end + + def test_delete_data_attribute + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_attribute({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_attribute name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_attribute({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_attribute_client_stub.call_count + end + end + end + + def test_list_data_attributes + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attributes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_attributes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_attributes_client_stub.call_count + end + end + end + + def test_get_data_attribute + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::DataAttribute.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_attribute({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_attribute name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_attribute({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_attribute_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb new file mode 100644 index 000000000000..9550f8cd2b8f --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb @@ -0,0 +1,1108 @@ +# 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_taxonomy_pb" +require "google/cloud/dataplex/v1/data_taxonomy_service" + +class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + 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_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_taxonomy_id = "hello world" + data_taxonomy = {} + validate_only = true + + create_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_taxonomy_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_update_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_taxonomy = {} + validate_only = true + + update_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_delete_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_taxonomy({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_taxonomy name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_taxonomy({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_list_data_taxonomies + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_taxonomies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_taxonomies, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_taxonomies_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_taxonomies_client_stub.call_rpc_count + end + end + + def test_get_data_taxonomy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_taxonomy, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_taxonomy_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_taxonomy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_taxonomy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_taxonomy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_taxonomy_client_stub.call_rpc_count + end + end + + def test_create_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_binding_id = "hello world" + data_attribute_binding = {} + validate_only = true + + create_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_attribute_binding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_update_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute_binding = {} + validate_only = true + + update_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_delete_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_attribute_binding({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_attribute_binding name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_attribute_binding({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_list_data_attribute_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attribute_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_attribute_bindings, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_attribute_bindings_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_attribute_bindings_client_stub.call_rpc_count + end + end + + def test_get_data_attribute_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_attribute_binding, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_attribute_binding_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_attribute_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_attribute_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_attribute_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_attribute_binding_client_stub.call_rpc_count + end + end + + def test_create_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_attribute_id = "hello world" + data_attribute = {} + validate_only = true + + create_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_attribute_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_attribute_client_stub.call_rpc_count + end + end + + def test_update_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_attribute = {} + validate_only = true + + update_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_attribute_client_stub.call_rpc_count + end + end + + def test_delete_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_attribute({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_attribute name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_attribute({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_attribute_client_stub.call_rpc_count + end + end + + def test_list_data_attributes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_data_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_attributes, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_attributes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_data_attributes_client_stub.call_rpc_count + end + end + + def test_get_data_attribute + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::DataAttribute.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_attribute, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_attribute_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_attribute({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_attribute name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_attribute({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_data_attribute_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration, config + end + + def test_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::DataTaxonomyService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::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::DataTaxonomyService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb new file mode 100644 index 000000000000..e934d9f6daa6 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_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/service_pb" +require "google/cloud/dataplex/v1/service_services_pb" +require "google/cloud/dataplex/v1/dataplex_service" + +class ::Google::Cloud::Dataplex::V1::DataplexService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + 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::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, 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::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb new file mode 100644 index 000000000000..cd77e6ba10e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb @@ -0,0 +1,115 @@ +# 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/dataplex_service" + +class ::Google::Cloud::Dataplex::V1::DataplexService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_asset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.asset_path project: "value0", location: "value1", lake: "value2", zone: "value3", asset: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/assets/value4", path + end + end + + def test_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.job_path project: "value0", location: "value1", lake: "value2", task: "value3", job: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3/jobs/value4", path + end + end + + def test_lake_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.lake_path project: "value0", location: "value1", lake: "value2" + assert_equal "projects/value0/locations/value1/lakes/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_task_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.task_path project: "value0", location: "value1", lake: "value2", task: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3", path + end + end + + def test_zone_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb new file mode 100644 index 000000000000..e4a4e31b4def --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb @@ -0,0 +1,1603 @@ +# 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/service_pb" +require "google/cloud/dataplex/v1/dataplex_service/rest" + + +class ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, 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_lake + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lake_id = "hello world" + lake = {} + validate_only = true + + create_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_lake_client_stub.call_count + end + end + end + + def test_update_lake + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + lake = {} + validate_only = true + + update_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_lake_client_stub.call_count + end + end + end + + def test_delete_lake + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_lake({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_lake name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_lake({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_lake_client_stub.call_count + end + end + end + + def test_list_lakes + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_lakes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lakes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lakes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_lakes_client_stub.call_count + end + end + end + + def test_get_lake + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Lake.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_lake({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_lake name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_lake({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_lake_client_stub.call_count + end + end + end + + def test_list_lake_actions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_lake_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_actions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_lake_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_lake_actions_client_stub.call_count + end + end + end + + def test_create_zone + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + zone_id = "hello world" + zone = {} + validate_only = true + + create_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_zone_client_stub.call_count + end + end + end + + def test_update_zone + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + zone = {} + validate_only = true + + update_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_zone_client_stub.call_count + end + end + end + + def test_delete_zone + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_zone({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_zone name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_zone({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_zone_client_stub.call_count + end + end + end + + def test_list_zones + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_zones_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zones_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_zones_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_zones_client_stub.call_count + end + end + end + + def test_get_zone + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Zone.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_zone({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_zone name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_zone({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_zone_client_stub.call_count + end + end + end + + def test_list_zone_actions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_zone_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_actions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_zone_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_zone_actions_client_stub.call_count + end + end + end + + def test_create_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset_id = "hello world" + asset = {} + validate_only = true + + create_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_asset_client_stub.call_count + end + end + end + + def test_update_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + asset = {} + validate_only = true + + update_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_asset_client_stub.call_count + end + end + end + + def test_delete_asset + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_asset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_asset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_asset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_asset_client_stub.call_count + end + end + end + + def test_list_assets + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_count + end + end + end + + def test_get_asset + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Asset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_asset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_asset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_asset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_asset_client_stub.call_count + end + end + end + + def test_list_asset_actions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_asset_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_actions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_asset_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_asset_actions_client_stub.call_count + end + end + end + + def test_create_task + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task_id = "hello world" + task = {} + validate_only = true + + create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_count + end + end + end + + def test_update_task + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + task = {} + validate_only = true + + update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_task_client_stub.call_count + end + end + end + + def test_delete_task + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_count + end + end + end + + def test_list_tasks + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_tasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_count + end + end + end + + def test_get_task + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Task.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_task({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_task name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_task({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_count + end + end + end + + def test_list_jobs + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_jobs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_count + end + end + end + + def test_run_task + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + labels = {} + args = {} + + run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_run_task_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_task({ name: name, labels: labels, args: args }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_task name: name, labels: labels, args: args do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_task({ name: name, labels: labels, args: args }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_count + end + end + end + + def test_get_job + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Job.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_count + end + end + end + + def test_cancel_job + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_cancel_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_job({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_job name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_job({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_job_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb new file mode 100644 index 000000000000..bf74e307542b --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb @@ -0,0 +1,1876 @@ +# 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/service_pb" +require "google/cloud/dataplex/v1/dataplex_service" + +class ::Google::Cloud::Dataplex::V1::DataplexService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + 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_lake + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + lake_id = "hello world" + lake = {} + validate_only = true + + create_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateLakeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["lake_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_lake_client_stub.call_rpc_count + end + end + + def test_update_lake + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + lake = {} + validate_only = true + + update_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_lake_client_stub.call_rpc_count + end + end + + def test_delete_lake + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_lake({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_lake name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_lake({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_lake_client_stub.call_rpc_count + end + end + + def test_list_lakes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_lakes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lakes, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lakes_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_lakes_client_stub.call_rpc_count + end + end + + def test_get_lake + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Lake.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_lake, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetLakeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_lake_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_lake({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_lake name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_lake({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_lake_client_stub.call_rpc_count + end + end + + def test_list_lake_actions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_lake_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_lake_actions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_lake_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_lake_actions_client_stub.call_rpc_count + end + end + + def test_create_zone + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + zone_id = "hello world" + zone = {} + validate_only = true + + create_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateZoneRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["zone_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_zone_client_stub.call_rpc_count + end + end + + def test_update_zone + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + zone = {} + validate_only = true + + update_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_zone_client_stub.call_rpc_count + end + end + + def test_delete_zone + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_zone({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_zone name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_zone({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_zone_client_stub.call_rpc_count + end + end + + def test_list_zones + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_zones_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_zones, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListZonesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_zones_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_zones_client_stub.call_rpc_count + end + end + + def test_get_zone + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Zone.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_zone, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetZoneRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_zone_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_zone({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_zone name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_zone({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_zone_client_stub.call_rpc_count + end + end + + def test_list_zone_actions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_zone_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_zone_actions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_zone_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_zone_actions_client_stub.call_rpc_count + end + end + + def test_create_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + asset_id = "hello world" + asset = {} + validate_only = true + + create_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAssetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["asset_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_asset_client_stub.call_rpc_count + end + end + + def test_update_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + asset = {} + validate_only = true + + update_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_asset_client_stub.call_rpc_count + end + end + + def test_delete_asset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_asset({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_asset name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_asset({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_asset_client_stub.call_rpc_count + end + end + + def test_list_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assets, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_assets_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_rpc_count + end + end + + def test_get_asset + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Asset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_asset, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetAssetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_asset_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_asset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_asset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_asset({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_asset_client_stub.call_rpc_count + end + end + + def test_list_asset_actions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_asset_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_asset_actions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_asset_actions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_asset_actions_client_stub.call_rpc_count + end + end + + def test_create_task + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + task_id = "hello world" + task = {} + validate_only = true + + create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateTaskRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["task_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_task_client_stub.call_rpc_count + end + end + + def test_update_task + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + task = {} + validate_only = true + + update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_task_client_stub.call_rpc_count + end + end + + def test_delete_task + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_task({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_task name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_task({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_task_client_stub.call_rpc_count + end + end + + def test_list_tasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_tasks, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListTasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_tasks_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_tasks_client_stub.call_rpc_count + end + end + + def test_get_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Task.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetTaskRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_task({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_task name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_task({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_task_client_stub.call_rpc_count + end + end + + def test_list_jobs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_jobs, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListJobsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_jobs_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_jobs_client_stub.call_rpc_count + end + end + + def test_run_task + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + labels = {} + args = {} + + run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_task, name + assert_kind_of ::Google::Cloud::Dataplex::V1::RunTaskRequest, request + assert_equal "hello world", request["name"] + assert_equal({}, request["labels"].to_h) + assert_equal({}, request["args"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_task_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_task({ name: name, labels: labels, args: args }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_task name: name, labels: labels, args: args do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_task({ name: name, labels: labels, args: args }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_task_client_stub.call_rpc_count + end + end + + def test_get_job + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Job.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_job_client_stub.call_rpc_count + end + end + + def test_cancel_job + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_job, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CancelJobRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_job_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_job({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_job name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_job({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_job_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration, config + end + + def test_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::DataplexService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::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::DataplexService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb new file mode 100644 index 000000000000..ca218c16a623 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb @@ -0,0 +1,79 @@ +# 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/metadata_service" + +class ::Google::Cloud::Dataplex::V1::MetadataService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_entity_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path + end + end + + def test_partition_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.partition_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4", partition: "value5" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4/partitions/value5", path + end + end + + def test_zone_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" + assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb new file mode 100644 index 000000000000..e7a54be21197 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb @@ -0,0 +1,600 @@ +# 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/metadata_pb" +require "google/cloud/dataplex/v1/metadata_service/rest" + + +class ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, 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_entity + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entity = {} + validate_only = true + + create_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_create_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entity parent: parent, entity: entity, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entity_client_stub.call_count + end + end + end + + def test_update_entity + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entity = {} + validate_only = true + + update_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_update_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_entity({ entity: entity, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_entity entity: entity, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_entity({ entity: entity, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_entity_client_stub.call_count + end + end + end + + def test_delete_entity + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_delete_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_entity({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_entity name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_entity({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_entity_client_stub.call_count + end + end + end + + def test_get_entity + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Entity.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + + get_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_get_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entity({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entity name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entity({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entity_client_stub.call_count + end + end + end + + def test_list_entities + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_list_entities_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entities_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entities_client_stub.call_count + end + end + end + + def test_create_partition + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Partition.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + partition = {} + validate_only = true + + create_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_create_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_partition parent: parent, partition: partition, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_partition_client_stub.call_count + end + end + end + + def test_delete_partition + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_delete_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_partition({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_partition name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_partition({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_partition_client_stub.call_count + end + end + end + + def test_get_partition + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::Partition.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_get_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_partition({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_partition name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_partition({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_partition_client_stub.call_count + end + end + end + + def test_list_partitions + # Create test objects. + client_result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_partitions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_list_partitions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_partitions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_partitions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb new file mode 100644 index 000000000000..d9f493056dce --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb @@ -0,0 +1,666 @@ +# 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/metadata_pb" +require "google/cloud/dataplex/v1/metadata_service" + +class ::Google::Cloud::Dataplex::V1::MetadataService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + 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_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entity = {} + validate_only = true + + create_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntityRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entity parent: parent, entity: entity, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entity_client_stub.call_rpc_count + end + end + + def test_update_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entity = {} + validate_only = true + + update_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_entity({ entity: entity, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_entity entity: entity, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_entity({ entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_entity_client_stub.call_rpc_count + end + end + + def test_delete_entity + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_entity({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_entity name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_entity({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_entity_client_stub.call_rpc_count + end + end + + def test_get_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + + get_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entity, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntityRequest, request + assert_equal "hello world", request["name"] + assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entity_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entity({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entity name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entity({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entity_client_stub.call_rpc_count + end + end + + def test_list_entities + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = :ENTITY_VIEW_UNSPECIFIED + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entities, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, request + assert_equal "hello world", request["parent"] + assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entities_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entities_client_stub.call_rpc_count + end + end + + def test_create_partition + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + partition = {} + validate_only = true + + create_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_partition, name + assert_kind_of ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Partition), request["partition"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_partition parent: parent, partition: partition, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_partition_client_stub.call_rpc_count + end + end + + def test_delete_partition + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_partition, name + assert_kind_of ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_partition({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_partition name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_partition({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_partition_client_stub.call_rpc_count + end + end + + def test_get_partition + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_partition, name + assert_kind_of ::Google::Cloud::Dataplex::V1::GetPartitionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_partition_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_partition({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_partition name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_partition({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_partition_client_stub.call_rpc_count + end + end + + def test_list_partitions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_partitions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_partitions, name + assert_kind_of ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_partitions_client_stub do + # Create client + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_partitions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration, config + end + + 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::MetadataService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb @@ -0,0 +1,26 @@ +# 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 "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 3818e4090c665bcabbb9581e270be41707a1dd62 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 19 Mar 2026 04:30:47 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 55 +- 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 | 1 + .../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_service.rb | 7 - .../dataplex/v1/content_service/client.rb | 868 +-- .../v1/content_service/credentials.rb | 3 - .../dataplex/v1/content_service/paths.rb | 73 - .../cloud/dataplex/v1/content_service/rest.rb | 54 - .../v1/content_service/rest/client.rb | 1171 ---- .../v1/content_service/rest/service_stub.rb | 633 -- .../cloud/dataplex/v1/content_services_pb.rb | 49 - .../cloud/dataplex/v1/data_discovery_pb.rb | 25 +- .../dataplex/v1/data_documentation_pb.rb | 28 +- .../cloud/dataplex/v1/data_product_service.rb | 0 .../v1/data_product_service/client.rb | 0 .../v1/data_product_service/credentials.rb | 0 .../v1/data_product_service/operations.rb | 0 .../dataplex/v1/data_product_service/paths.rb | 0 .../dataplex/v1/data_product_service/rest.rb | 0 .../v1/data_product_service/rest/client.rb | 0 .../data_product_service/rest/operations.rb | 0 .../data_product_service/rest/service_stub.rb | 0 .../cloud/dataplex/v1/data_products_pb.rb | 0 .../dataplex/v1/data_products_services_pb.rb | 0 .../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 +- .../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 | 0 .../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 - .../catalog_service/create_metadata_feed.rb | 0 .../catalog_service/delete_metadata_feed.rb | 0 .../catalog_service/get_metadata_feed.rb | 0 .../catalog_service/list_metadata_feeds.rb | 0 .../catalog_service/lookup_context.rb | 0 .../catalog_service/lookup_entry_links.rb | 0 .../catalog_service/update_entry_link.rb | 0 .../catalog_service/update_metadata_feed.rb | 0 .../content_service/create_content.rb | 47 - .../content_service/delete_content.rb | 47 - .../snippets/content_service/get_content.rb | 47 - .../content_service/get_iam_policy.rb | 47 - .../snippets/content_service/list_content.rb | 51 - .../content_service/set_iam_policy.rb | 47 - .../content_service/test_iam_permissions.rb | 47 - .../content_service/update_content.rb | 47 - .../data_product_service/create_data_asset.rb | 0 .../create_data_product.rb | 0 .../data_product_service/delete_data_asset.rb | 0 .../delete_data_product.rb | 0 .../data_product_service/get_data_asset.rb | 0 .../data_product_service/get_data_product.rb | 0 .../data_product_service/list_data_assets.rb | 0 .../list_data_products.rb | 0 .../data_product_service/update_data_asset.rb | 0 .../update_data_product.rb | 0 .../dataplex_service/create_environment.rb | 54 - .../dataplex_service/delete_environment.rb | 54 - .../dataplex_service/get_environment.rb | 47 - .../dataplex_service/list_environments.rb | 51 - .../dataplex_service/list_sessions.rb | 51 - .../dataplex_service/update_environment.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_paths_test.rb | 67 - .../dataplex/v1/content_service_rest_test.rb | 543 -- .../cloud/dataplex/v1/content_service_test.rb | 493 -- .../data_product_service_operations_test.rb | 0 .../v1/data_product_service_paths_test.rb | 0 .../v1/data_product_service_rest_test.rb | 0 .../dataplex/v1/data_product_service_test.rb | 0 .../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 + .../google-cloud-dataplex-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-dataplex-v1/.rubocop.yml | 33 - .../google-cloud-dataplex-v1/.toys.rb | 28 - .../google-cloud-dataplex-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-dataplex-v1/CHANGELOG.md | 2 - .../google-cloud-dataplex-v1/Gemfile | 14 - .../google-cloud-dataplex-v1/LICENSE.md | 201 - .../google-cloud-dataplex-v1/README.md | 154 - .../google-cloud-dataplex-v1/Rakefile | 169 - .../gapic_metadata.json | 724 --- .../google-cloud-dataplex-v1.gemspec | 30 - .../lib/google-cloud-dataplex-v1.rb | 21 - .../lib/google/cloud/dataplex/v1.rb | 53 - .../google/cloud/dataplex/v1/analyze_pb.rb | 39 - .../cloud/dataplex/v1/bindings_override.rb | 564 -- .../cloud/dataplex/v1/business_glossary_pb.rb | 52 - .../dataplex/v1/business_glossary_service.rb | 61 - .../v1/business_glossary_service/client.rb | 2002 ------- .../business_glossary_service/credentials.rb | 47 - .../business_glossary_service/operations.rb | 841 --- .../v1/business_glossary_service/paths.rb | 111 - .../v1/business_glossary_service/rest.rb | 59 - .../business_glossary_service/rest/client.rb | 1863 ------ .../rest/operations.rb | 954 --- .../rest/service_stub.rb | 1002 ---- .../v1/business_glossary_services_pb.rb | 81 - .../google/cloud/dataplex/v1/catalog_pb.rb | 119 - .../cloud/dataplex/v1/catalog_service.rb | 60 - .../dataplex/v1/catalog_service/client.rb | 4475 --------------- .../v1/catalog_service/credentials.rb | 50 - .../dataplex/v1/catalog_service/operations.rb | 841 --- .../dataplex/v1/catalog_service/paths.rb | 220 - .../cloud/dataplex/v1/catalog_service/rest.rb | 58 - .../v1/catalog_service/rest/client.rb | 4182 -------------- .../v1/catalog_service/rest/operations.rb | 954 --- .../v1/catalog_service/rest/service_stub.rb | 2353 -------- .../cloud/dataplex/v1/catalog_services_pb.rb | 127 - .../lib/google/cloud/dataplex/v1/cmek_pb.rb | 40 - .../google/cloud/dataplex/v1/cmek_service.rb | 56 - .../cloud/dataplex/v1/cmek_service/client.rb | 961 ---- .../dataplex/v1/cmek_service/credentials.rb | 47 - .../dataplex/v1/cmek_service/operations.rb | 841 --- .../cloud/dataplex/v1/cmek_service/paths.rb | 69 - .../cloud/dataplex/v1/cmek_service/rest.rb | 54 - .../dataplex/v1/cmek_service/rest/client.rb | 892 --- .../v1/cmek_service/rest/operations.rb | 954 --- .../v1/cmek_service/rest/service_stub.rb | 388 -- .../cloud/dataplex/v1/cmek_services_pb.rb | 53 - .../google/cloud/dataplex/v1/content_pb.rb | 25 - .../cloud/dataplex/v1/content_service.rb | 49 - .../dataplex/v1/content_service/client.rb | 395 -- .../v1/content_service/credentials.rb | 44 - .../cloud/dataplex/v1/content_services_pb.rb | 29 - .../cloud/dataplex/v1/data_discovery_pb.rb | 32 - .../dataplex/v1/data_documentation_pb.rb | 29 - .../cloud/dataplex/v1/data_profile_pb.rb | 39 - .../cloud/dataplex/v1/data_quality_pb.rb | 56 - .../cloud/dataplex/v1/data_scan_service.rb | 58 - .../dataplex/v1/data_scan_service/client.rb | 1398 ----- .../v1/data_scan_service/credentials.rb | 47 - .../v1/data_scan_service/operations.rb | 841 --- .../dataplex/v1/data_scan_service/paths.rb | 163 - .../dataplex/v1/data_scan_service/rest.rb | 56 - .../v1/data_scan_service/rest/client.rb | 1301 ----- .../v1/data_scan_service/rest/operations.rb | 954 --- .../v1/data_scan_service/rest/service_stub.rb | 642 --- .../cloud/dataplex/v1/data_taxonomy_pb.rb | 53 - .../dataplex/v1/data_taxonomy_service.rb | 59 - .../v1/data_taxonomy_service/client.rb | 2060 ------- .../v1/data_taxonomy_service/credentials.rb | 47 - .../v1/data_taxonomy_service/operations.rb | 841 --- .../v1/data_taxonomy_service/paths.rb | 109 - .../dataplex/v1/data_taxonomy_service/rest.rb | 55 - .../v1/data_taxonomy_service/rest/client.rb | 1890 ------ .../data_taxonomy_service/rest/operations.rb | 954 --- .../rest/service_stub.rb | 1003 ---- .../dataplex/v1/data_taxonomy_services_pb.rb | 77 - .../cloud/dataplex/v1/dataplex_service.rb | 60 - .../dataplex/v1/dataplex_service/client.rb | 3366 ----------- .../v1/dataplex_service/credentials.rb | 47 - .../v1/dataplex_service/operations.rb | 841 --- .../dataplex/v1/dataplex_service/paths.rb | 157 - .../dataplex/v1/dataplex_service/rest.rb | 58 - .../v1/dataplex_service/rest/client.rb | 3143 ---------- .../v1/dataplex_service/rest/operations.rb | 954 --- .../v1/dataplex_service/rest/service_stub.rb | 1738 ------ .../cloud/dataplex/v1/datascans_common_pb.rb | 24 - .../google/cloud/dataplex/v1/datascans_pb.rb | 58 - .../dataplex/v1/datascans_services_pb.rb | 66 - .../lib/google/cloud/dataplex/v1/logs_pb.rb | 68 - .../google/cloud/dataplex/v1/metadata_pb.rb | 60 - .../cloud/dataplex/v1/metadata_service.rb | 56 - .../dataplex/v1/metadata_service/client.rb | 1370 ----- .../v1/metadata_service/credentials.rb | 47 - .../dataplex/v1/metadata_service/paths.rb | 102 - .../dataplex/v1/metadata_service/rest.rb | 54 - .../v1/metadata_service/rest/client.rb | 1273 ---- .../v1/metadata_service/rest/service_stub.rb | 633 -- .../cloud/dataplex/v1/metadata_services_pb.rb | 62 - .../google/cloud/dataplex/v1/processing_pb.rb | 31 - .../google/cloud/dataplex/v1/resources_pb.rb | 64 - .../lib/google/cloud/dataplex/v1/rest.rb | 45 - .../google/cloud/dataplex/v1/security_pb.rb | 24 - .../google/cloud/dataplex/v1/service_pb.rb | 66 - .../cloud/dataplex/v1/service_services_pb.rb | 104 - .../lib/google/cloud/dataplex/v1/tasks_pb.rb | 41 - .../lib/google/cloud/dataplex/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/dataplex/v1/analyze.rb | 294 - .../cloud/dataplex/v1/business_glossary.rb | 531 -- .../google/cloud/dataplex/v1/catalog.rb | 2253 -------- .../google/cloud/dataplex/v1/cmek.rb | 216 - .../cloud/dataplex/v1/data_discovery.rb | 222 - .../cloud/dataplex/v1/data_documentation.rb | 124 - .../google/cloud/dataplex/v1/data_profile.rb | 340 -- .../google/cloud/dataplex/v1/data_quality.rb | 690 --- .../google/cloud/dataplex/v1/data_taxonomy.rb | 567 -- .../google/cloud/dataplex/v1/datascans.rb | 561 -- .../cloud/dataplex/v1/datascans_common.rb | 52 - .../google/cloud/dataplex/v1/logs.rb | 964 ---- .../google/cloud/dataplex/v1/metadata.rb | 741 --- .../google/cloud/dataplex/v1/processing.rb | 137 - .../google/cloud/dataplex/v1/resources.rb | 858 --- .../google/cloud/dataplex/v1/security.rb | 61 - .../google/cloud/dataplex/v1/service.rb | 655 --- .../google/cloud/dataplex/v1/tasks.rb | 452 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-cloud-dataplex-v1/snippets/Gemfile | 32 - .../create_glossary.rb | 54 - .../create_glossary_category.rb | 47 - .../create_glossary_term.rb | 47 - .../delete_glossary.rb | 54 - .../delete_glossary_category.rb | 47 - .../delete_glossary_term.rb | 47 - .../business_glossary_service/get_glossary.rb | 47 - .../get_glossary_category.rb | 47 - .../get_glossary_term.rb | 47 - .../list_glossaries.rb | 51 - .../list_glossary_categories.rb | 51 - .../list_glossary_terms.rb | 51 - .../update_glossary.rb | 54 - .../update_glossary_category.rb | 47 - .../update_glossary_term.rb | 47 - .../catalog_service/cancel_metadata_job.rb | 47 - .../catalog_service/create_aspect_type.rb | 54 - .../snippets/catalog_service/create_entry.rb | 47 - .../catalog_service/create_entry_group.rb | 54 - .../catalog_service/create_entry_link.rb | 47 - .../catalog_service/create_entry_type.rb | 54 - .../catalog_service/create_metadata_job.rb | 54 - .../catalog_service/delete_aspect_type.rb | 54 - .../snippets/catalog_service/delete_entry.rb | 47 - .../catalog_service/delete_entry_group.rb | 54 - .../catalog_service/delete_entry_link.rb | 47 - .../catalog_service/delete_entry_type.rb | 54 - .../catalog_service/get_aspect_type.rb | 47 - .../snippets/catalog_service/get_entry.rb | 47 - .../catalog_service/get_entry_group.rb | 47 - .../catalog_service/get_entry_link.rb | 47 - .../catalog_service/get_entry_type.rb | 47 - .../catalog_service/get_metadata_job.rb | 47 - .../catalog_service/list_aspect_types.rb | 51 - .../snippets/catalog_service/list_entries.rb | 51 - .../catalog_service/list_entry_groups.rb | 51 - .../catalog_service/list_entry_types.rb | 51 - .../catalog_service/list_metadata_jobs.rb | 51 - .../snippets/catalog_service/lookup_entry.rb | 47 - .../catalog_service/search_entries.rb | 51 - .../catalog_service/update_aspect_type.rb | 54 - .../snippets/catalog_service/update_entry.rb | 47 - .../catalog_service/update_entry_group.rb | 54 - .../catalog_service/update_entry_type.rb | 54 - .../cmek_service/create_encryption_config.rb | 54 - .../cmek_service/delete_encryption_config.rb | 54 - .../cmek_service/get_encryption_config.rb | 47 - .../cmek_service/list_encryption_configs.rb | 51 - .../cmek_service/update_encryption_config.rb | 54 - .../data_scan_service/create_data_scan.rb | 54 - .../data_scan_service/delete_data_scan.rb | 54 - .../generate_data_quality_rules.rb | 47 - .../data_scan_service/get_data_scan.rb | 47 - .../data_scan_service/get_data_scan_job.rb | 47 - .../data_scan_service/list_data_scan_jobs.rb | 51 - .../data_scan_service/list_data_scans.rb | 51 - .../data_scan_service/run_data_scan.rb | 47 - .../data_scan_service/update_data_scan.rb | 54 - .../create_data_attribute.rb | 54 - .../create_data_attribute_binding.rb | 54 - .../create_data_taxonomy.rb | 54 - .../delete_data_attribute.rb | 54 - .../delete_data_attribute_binding.rb | 54 - .../delete_data_taxonomy.rb | 54 - .../get_data_attribute.rb | 47 - .../get_data_attribute_binding.rb | 47 - .../get_data_taxonomy.rb | 47 - .../list_data_attribute_bindings.rb | 51 - .../list_data_attributes.rb | 51 - .../list_data_taxonomies.rb | 51 - .../update_data_attribute.rb | 54 - .../update_data_attribute_binding.rb | 54 - .../update_data_taxonomy.rb | 54 - .../snippets/dataplex_service/cancel_job.rb | 47 - .../snippets/dataplex_service/create_asset.rb | 54 - .../snippets/dataplex_service/create_lake.rb | 54 - .../snippets/dataplex_service/create_task.rb | 54 - .../snippets/dataplex_service/create_zone.rb | 54 - .../snippets/dataplex_service/delete_asset.rb | 54 - .../snippets/dataplex_service/delete_lake.rb | 54 - .../snippets/dataplex_service/delete_task.rb | 54 - .../snippets/dataplex_service/delete_zone.rb | 54 - .../snippets/dataplex_service/get_asset.rb | 47 - .../snippets/dataplex_service/get_job.rb | 47 - .../snippets/dataplex_service/get_lake.rb | 47 - .../snippets/dataplex_service/get_task.rb | 47 - .../snippets/dataplex_service/get_zone.rb | 47 - .../dataplex_service/list_asset_actions.rb | 51 - .../snippets/dataplex_service/list_assets.rb | 51 - .../snippets/dataplex_service/list_jobs.rb | 51 - .../dataplex_service/list_lake_actions.rb | 51 - .../snippets/dataplex_service/list_lakes.rb | 51 - .../snippets/dataplex_service/list_tasks.rb | 51 - .../dataplex_service/list_zone_actions.rb | 51 - .../snippets/dataplex_service/list_zones.rb | 51 - .../snippets/dataplex_service/run_task.rb | 47 - .../snippets/dataplex_service/update_asset.rb | 54 - .../snippets/dataplex_service/update_lake.rb | 54 - .../snippets/dataplex_service/update_task.rb | 54 - .../snippets/dataplex_service/update_zone.rb | 54 - .../metadata_service/create_entity.rb | 47 - .../metadata_service/create_partition.rb | 47 - .../metadata_service/delete_entity.rb | 47 - .../metadata_service/delete_partition.rb | 47 - .../snippets/metadata_service/get_entity.rb | 47 - .../metadata_service/get_partition.rb | 47 - .../metadata_service/list_entities.rb | 51 - .../metadata_service/list_partitions.rb | 51 - .../metadata_service/update_entity.rb | 47 - ...pet_metadata_google.cloud.dataplex.v1.json | 5095 ----------------- ...siness_glossary_service_operations_test.rb | 400 -- .../business_glossary_service_paths_test.rb | 91 - .../v1/business_glossary_service_rest_test.rb | 933 --- .../v1/business_glossary_service_test.rb | 1066 ---- .../v1/catalog_service_operations_test.rb | 400 -- .../dataplex/v1/catalog_service_paths_test.rb | 163 - .../dataplex/v1/catalog_service_rest_test.rb | 2176 ------- .../cloud/dataplex/v1/catalog_service_test.rb | 2527 -------- .../v1/cmek_service_operations_test.rb | 400 -- .../dataplex/v1/cmek_service_paths_test.rb | 67 - .../dataplex/v1/cmek_service_rest_test.rb | 377 -- .../cloud/dataplex/v1/cmek_service_test.rb | 444 -- .../cloud/dataplex/v1/content_service_test.rb | 104 - .../v1/data_scan_service_operations_test.rb | 400 -- .../v1/data_scan_service_paths_test.rb | 127 - .../v1/data_scan_service_rest_test.rb | 600 -- .../dataplex/v1/data_scan_service_test.rb | 695 --- .../data_taxonomy_service_operations_test.rb | 400 -- .../v1/data_taxonomy_service_paths_test.rb | 91 - .../v1/data_taxonomy_service_rest_test.rb | 939 --- .../dataplex/v1/data_taxonomy_service_test.rb | 1108 ---- .../v1/dataplex_service_operations_test.rb | 400 -- .../v1/dataplex_service_paths_test.rb | 115 - .../dataplex/v1/dataplex_service_rest_test.rb | 1603 ------ .../dataplex/v1/dataplex_service_test.rb | 1876 ------ .../v1/metadata_service_paths_test.rb | 79 - .../dataplex/v1/metadata_service_rest_test.rb | 600 -- .../dataplex/v1/metadata_service_test.rb | 666 --- .../google-cloud-dataplex-v1/test/helper.rb | 26 - 393 files changed, 4450 insertions(+), 104686 deletions(-) delete mode 100644 google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb delete mode 100644 google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb delete mode 100644 google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb delete mode 100644 google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_product_service.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_product_service/client.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_product_service/operations.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_product_service/paths.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_product_service/rest.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_products_pb.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/lib/google/cloud/dataplex/v1/data_products_services_pb.rb (100%) delete mode 100644 google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/content.rb rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/proto_docs/google/cloud/dataplex/v1/data_products.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/catalog_service/create_metadata_feed.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/catalog_service/delete_metadata_feed.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/catalog_service/get_metadata_feed.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/catalog_service/list_metadata_feeds.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/catalog_service/lookup_context.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/catalog_service/lookup_entry_links.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/catalog_service/update_entry_link.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/catalog_service/update_metadata_feed.rb (100%) delete mode 100644 google-cloud-dataplex-v1/snippets/content_service/create_content.rb delete mode 100644 google-cloud-dataplex-v1/snippets/content_service/delete_content.rb delete mode 100644 google-cloud-dataplex-v1/snippets/content_service/get_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/list_content.rb delete mode 100644 google-cloud-dataplex-v1/snippets/content_service/set_iam_policy.rb delete mode 100644 google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb delete mode 100644 google-cloud-dataplex-v1/snippets/content_service/update_content.rb rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/create_data_asset.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/create_data_product.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/delete_data_asset.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/delete_data_product.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/get_data_asset.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/get_data_product.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/list_data_assets.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/list_data_products.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/update_data_asset.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/snippets/data_product_service/update_data_product.rb (100%) delete mode 100644 google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb delete mode 100644 google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb delete mode 100644 google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb delete mode 100644 google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb delete mode 100644 google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb delete mode 100644 google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb delete mode 100644 google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb delete mode 100644 google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_rest_test.rb rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/test/google/cloud/dataplex/v1/data_product_service_operations_test.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/test/google/cloud/dataplex/v1/data_product_service_rest_test.rb (100%) rename {owl-bot-staging/google-cloud-dataplex-v1 => google-cloud-dataplex-v1}/test/google/cloud/dataplex/v1/data_product_service_test.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/business_glossary.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/cmek.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_discovery.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_category.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_term.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_category.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_term.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_category.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_term.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossaries.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_categories.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_terms.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_category.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_term.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/cancel_metadata_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_link.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_link.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_link.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/create_encryption_config.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/delete_encryption_config.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/get_encryption_config.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/list_encryption_configs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/update_encryption_config.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb diff --git a/google-cloud-dataplex-v1/.owlbot-manifest.json b/google-cloud-dataplex-v1/.owlbot-manifest.json index 3e1adde4ebe7..978ecfe9afd1 100644 --- a/google-cloud-dataplex-v1/.owlbot-manifest.json +++ b/google-cloud-dataplex-v1/.owlbot-manifest.json @@ -54,13 +54,20 @@ "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 +130,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 +176,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 +248,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 +295,11 @@ "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", 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..7525fabe3517 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb @@ -21,6 +21,7 @@ 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. - # - # @overload update_content(request, options = nil) - # Pass arguments to `update_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_content(update_mask: nil, content: nil, validate_only: nil) - # Pass arguments to `update_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new - # - # # Call the update_content method. - # result = client.update_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def update_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_content.metadata.to_h - - # Set x-goog-api-client, 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.content&.name - header_params["content.name"] = request.content.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :update_content, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a content. - # - # @overload delete_content(request, options = nil) - # Pass arguments to `delete_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_content(name: nil) - # Pass arguments to `delete_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new - # - # # Call the delete_content method. - # result = client.delete_content request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_content.metadata.to_h - - # Set x-goog-api-client, 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_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :delete_content, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a content resource. - # - # @overload get_content(request, options = nil) - # Pass arguments to `get_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_content(name: nil, view: nil) - # Pass arguments to `get_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] - # Optional. Specify content view to make a partial request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetContentRequest.new - # - # # Call the get_content method. - # result = client.get_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def get_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_content.metadata.to_h - - # Set x-goog-api-client, 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_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :get_content, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a contentitem resource. A `NOT_FOUND` - # error is returned if the resource does not exist. An empty policy is - # returned if the resource exists but does not have a policy set on it. - # - # Caller must have Google IAM `dataplex.content.getIamPolicy` permission - # on the resource. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, 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.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified contentitem resource. - # Replaces any existing policy. - # - # Caller must have Google IAM `dataplex.content.setIamPolicy` permission - # on the resource. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, 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.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the caller's permissions on a resource. - # If the resource does not exist, an empty set of - # permissions is returned (a `NOT_FOUND` error is not returned). - # - # A caller is not required to have Google IAM permission to make this - # request. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, 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.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List content. - # - # @overload list_content(request, options = nil) - # Pass arguments to `list_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @param page_size [::Integer] - # Optional. Maximum number of content to return. The service may return fewer - # than this value. If unspecified, at most 10 content will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListContent` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListContent` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Filter request. Filters are case-sensitive. - # The following formats are supported: - # - # labels.key1 = "value1" - # labels:key1 - # type = "NOTEBOOK" - # type = "SQL_SCRIPT" - # - # These restrictions can be coinjoined with AND, OR and NOT conjunctions. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListContentRequest.new - # - # # Call the list_content method. - # result = client.list_content request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. - # p item - # end - # - def list_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_content.metadata.to_h - - # Set x-goog-api-client, 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_content.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.call_rpc :list_content, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @content_service_stub, :list_content, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - ## # Configuration class for the ContentService API. # @@ -1019,22 +227,6 @@ def list_content request, options = nil # Configuration can be applied globally to all clients, or to a single client # on construction. # - # @example - # - # # Modify the global config, setting the timeout for - # # create_content to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # # @!attribute [rw] endpoint # A custom service endpoint, as a hostname or hostname:port. The default is # nil, indicating to use the default endpoint in the current universe domain. @@ -1189,66 +381,8 @@ def channel_pool # trigger a retry. # class Rpcs - ## - # RPC-specific configuration for `create_content` - # @return [::Gapic::Config::Method] - # - attr_reader :create_content - ## - # RPC-specific configuration for `update_content` - # @return [::Gapic::Config::Method] - # - attr_reader :update_content - ## - # RPC-specific configuration for `delete_content` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_content - ## - # RPC-specific configuration for `get_content` - # @return [::Gapic::Config::Method] - # - attr_reader :get_content - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_content` - # @return [::Gapic::Config::Method] - # - attr_reader :list_content - # @private - def initialize parent_rpcs = nil - create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content - @create_content = ::Gapic::Config::Method.new create_content_config - update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content - @update_content = ::Gapic::Config::Method.new update_content_config - delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content - @delete_content = ::Gapic::Config::Method.new delete_content_config - get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content - @get_content = ::Gapic::Config::Method.new get_content_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content - @list_content = ::Gapic::Config::Method.new list_content_config - + def initialize _parent_rpcs = nil yield self if block_given? end 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/content_service/credentials.rb index 2e442e2b4f72..a8bbac2b1c78 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/content_service/credentials.rb @@ -25,9 +25,6 @@ module V1 module ContentService # Credentials for the ContentService API. class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] self.env_vars = [ "GOOGLE_CLOUD_CREDENTIALS", "GOOGLE_CLOUD_KEYFILE", 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/content_service/paths.rb deleted file mode 100644 index cfd9a8495554..000000000000 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/paths.rb +++ /dev/null @@ -1,73 +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 - module ContentService - # Path helper methods for the ContentService API. - module Paths - ## - # Create a fully-qualified Content resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/content/{content}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param content [String] - # - # @return [::String] - def content_path project:, location:, lake:, content: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/content/#{content}" - end - - ## - # Create a fully-qualified Lake resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # - # @return [::String] - def lake_path project:, location:, lake: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}" - end - - extend self - end - end - end - end - end -end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb deleted file mode 100644 index aca3fba7ad90..000000000000 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest.rb +++ /dev/null @@ -1,54 +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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/content_service/credentials" -require "google/cloud/dataplex/v1/content_service/paths" -require "google/cloud/dataplex/v1/content_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # ContentService manages Notebook and SQL Scripts for Dataplex Universal - # Catalog. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/content_service/rest" - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - module ContentService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/content_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb deleted file mode 100644 index 0f57627a4a87..000000000000 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +++ /dev/null @@ -1,1171 +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 "google/cloud/errors" -require "google/cloud/dataplex/v1/content_pb" -require "google/cloud/dataplex/v1/content_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - module Rest - ## - # REST client for the ContentService service. - # - # ContentService manages Notebook and SQL Scripts for Dataplex Universal - # Catalog. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :content_service_stub - - ## - # Configure the ContentService Client class. - # - # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ContentService clients - # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_content.timeout = 60.0 - - default_config.rpcs.update_content.timeout = 60.0 - - default_config.rpcs.delete_content.timeout = 60.0 - - default_config.rpcs.get_content.timeout = 60.0 - default_config.rpcs.get_content.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_content.timeout = 60.0 - default_config.rpcs.list_content.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ContentService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @content_service_stub.universe_domain - end - - ## - # Create a new ContentService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ContentService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @content_service_stub = ::Google::Cloud::Dataplex::V1::ContentService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @content_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @content_service_stub.endpoint - config.universe_domain = @content_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @content_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.bindings_override = @config.bindings_override - config.logger = @content_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @content_service_stub.logger - end - - # Service calls - - ## - # Create a content. - # - # @overload create_content(request, options = nil) - # Pass arguments to `create_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_content(parent: nil, content: nil, validate_only: nil) - # Pass arguments to `create_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] - # Required. Content resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateContentRequest.new - # - # # Call the create_content method. - # result = client.create_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def create_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_content.metadata.to_h - - # Set x-goog-api-client, 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_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.create_content request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a content. Only supports full resource update. - # - # @overload update_content(request, options = nil) - # Pass arguments to `update_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_content(update_mask: nil, content: nil, validate_only: nil) - # Pass arguments to `update_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param content [::Google::Cloud::Dataplex::V1::Content, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new - # - # # Call the update_content method. - # result = client.update_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def update_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_content.metadata.to_h - - # Set x-goog-api-client, 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_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.update_content request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a content. - # - # @overload delete_content(request, options = nil) - # Pass arguments to `delete_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_content(name: nil) - # Pass arguments to `delete_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteContentRequest.new - # - # # Call the delete_content method. - # result = client.delete_content request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_content.metadata.to_h - - # Set x-goog-api-client, 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_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.delete_content request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a content resource. - # - # @overload get_content(request, options = nil) - # Pass arguments to `get_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_content(name: nil, view: nil) - # Pass arguments to `get_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the content: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @param view [::Google::Cloud::Dataplex::V1::GetContentRequest::ContentView] - # Optional. Specify content view to make a partial request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetContentRequest.new - # - # # Call the get_content method. - # result = client.get_content request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Content. - # p result - # - def get_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_content.metadata.to_h - - # Set x-goog-api-client, 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_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.get_content request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a contentitem resource. A `NOT_FOUND` - # error is returned if the resource does not exist. An empty policy is - # returned if the resource exists but does not have a policy set on it. - # - # Caller must have Google IAM `dataplex.content.getIamPolicy` permission - # on the resource. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, 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_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified contentitem resource. - # Replaces any existing policy. - # - # Caller must have Google IAM `dataplex.content.setIamPolicy` permission - # on the resource. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, 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.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the caller's permissions on a resource. - # If the resource does not exist, an empty set of - # permissions is returned (a `NOT_FOUND` error is not returned). - # - # A caller is not required to have Google IAM permission to make this - # request. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, 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.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List content. - # - # @overload list_content(request, options = nil) - # Pass arguments to `list_content` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListContentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListContentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_content(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_content` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id} - # @param page_size [::Integer] - # Optional. Maximum number of content to return. The service may return fewer - # than this value. If unspecified, at most 10 content will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListContent` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListContent` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Filter request. Filters are case-sensitive. - # The following formats are supported: - # - # labels.key1 = "value1" - # labels:key1 - # type = "NOTEBOOK" - # type = "SQL_SCRIPT" - # - # These restrictions can be coinjoined with AND, OR and NOT conjunctions. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Content>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListContentRequest.new - # - # # Call the list_content method. - # result = client.list_content request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Content. - # p item - # end - # - def list_content request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListContentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_content.metadata.to_h - - # Set x-goog-api-client, 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_content.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_content.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @content_service_stub.list_content request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @content_service_stub, :list_content, "content", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ContentService REST API. - # - # This class represents the configuration for ContentService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::ContentService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_content to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::ContentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_content.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # 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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - 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 ContentService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_content` - # @return [::Gapic::Config::Method] - # - attr_reader :create_content - ## - # RPC-specific configuration for `update_content` - # @return [::Gapic::Config::Method] - # - attr_reader :update_content - ## - # RPC-specific configuration for `delete_content` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_content - ## - # RPC-specific configuration for `get_content` - # @return [::Gapic::Config::Method] - # - attr_reader :get_content - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `list_content` - # @return [::Gapic::Config::Method] - # - attr_reader :list_content - - # @private - def initialize parent_rpcs = nil - create_content_config = parent_rpcs.create_content if parent_rpcs.respond_to? :create_content - @create_content = ::Gapic::Config::Method.new create_content_config - update_content_config = parent_rpcs.update_content if parent_rpcs.respond_to? :update_content - @update_content = ::Gapic::Config::Method.new update_content_config - delete_content_config = parent_rpcs.delete_content if parent_rpcs.respond_to? :delete_content - @delete_content = ::Gapic::Config::Method.new delete_content_config - get_content_config = parent_rpcs.get_content if parent_rpcs.respond_to? :get_content - @get_content = ::Gapic::Config::Method.new get_content_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_content_config = parent_rpcs.list_content if parent_rpcs.respond_to? :list_content - @list_content = ::Gapic::Config::Method.new list_content_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/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/content_service/rest/service_stub.rb deleted file mode 100644 index ce085e45210c..000000000000 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +++ /dev/null @@ -1,633 +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 "google/cloud/dataplex/v1/content_pb" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - module Rest - ## - # REST service stub for the ContentService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # A result object deserialized from the server's reply - def create_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_content", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.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_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # A result object deserialized from the server's reply - def update_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_content", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.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_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_content", - 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 get_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Content] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Content] - # A result object deserialized from the server's reply - def get_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_content", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Content.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_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.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_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListContentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListContentResponse] - # A result object deserialized from the server's reply - def list_content request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_content_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_content", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListContentResponse.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 create_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/contentitems", - body: "content", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/content", - body: "content", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{content.name}", - body: "content", - matches: [ - ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{content.name}", - body: "content", - matches: [ - ["content.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/contentitems(?:/.*)?$}, true] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/content(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_content REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListContentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_content_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/contentitems", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/content", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb index b9167ad2b50e..78d01b5ab760 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb @@ -23,55 +23,6 @@ module Google module Cloud module Dataplex module V1 - module ContentService - # ContentService manages Notebook and SQL Scripts for Dataplex Universal - # Catalog. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.ContentService' - - # Create a content. - rpc :CreateContent, ::Google::Cloud::Dataplex::V1::CreateContentRequest, ::Google::Cloud::Dataplex::V1::Content - # Update a content. Only supports full resource update. - rpc :UpdateContent, ::Google::Cloud::Dataplex::V1::UpdateContentRequest, ::Google::Cloud::Dataplex::V1::Content - # Delete a content. - rpc :DeleteContent, ::Google::Cloud::Dataplex::V1::DeleteContentRequest, ::Google::Protobuf::Empty - # Get a content resource. - rpc :GetContent, ::Google::Cloud::Dataplex::V1::GetContentRequest, ::Google::Cloud::Dataplex::V1::Content - # Gets the access control policy for a contentitem resource. A `NOT_FOUND` - # error is returned if the resource does not exist. An empty policy is - # returned if the resource exists but does not have a policy set on it. - # - # Caller must have Google IAM `dataplex.content.getIamPolicy` permission - # on the resource. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the access control policy on the specified contentitem resource. - # Replaces any existing policy. - # - # Caller must have Google IAM `dataplex.content.setIamPolicy` permission - # on the resource. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the caller's permissions on a resource. - # If the resource does not exist, an empty set of - # permissions is returned (a `NOT_FOUND` error is not returned). - # - # A caller is not required to have Google IAM permission to make this - # request. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # List content. - rpc :ListContent, ::Google::Cloud::Dataplex::V1::ListContentRequest, ::Google::Cloud::Dataplex::V1::ListContentResponse - end - - Stub = Service.rpc_stub_class - end end end end diff --git a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb index 6ca831c0644b..3189565cefed 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb @@ -10,29 +10,8 @@ descriptor_data = "\n-google/cloud/dataplex/v1/data_discovery.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xcb\x08\n\x11\x44\x61taDiscoverySpec\x12m\n\x1a\x62igquery_publishing_config\x18\x01 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfigB\x03\xe0\x41\x01\x12S\n\x0estorage_config\x18\x64 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfigH\x00\x1a\xee\x02\n\x18\x42igQueryPublishingConfig\x12g\n\ntable_type\x18\x02 \x01(\x0e\x32N.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableTypeB\x03\xe0\x41\x01\x12H\n\nconnection\x18\x03 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,bigqueryconnection.googleapis.com/Connection\x12\x15\n\x08location\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x07project\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\"B\n\tTableType\x12\x1a\n\x16TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45XTERNAL\x10\x01\x12\x0b\n\x07\x42IGLAKE\x10\x02\x1a\xed\x03\n\rStorageConfig\x12\x1d\n\x10include_patterns\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12^\n\x0b\x63sv_options\x18\x03 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptionsB\x03\xe0\x41\x01\x12`\n\x0cjson_options\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptionsB\x03\xe0\x41\x01\x1a\x8f\x01\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\x17type_inference_disabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05quote\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1aJ\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17type_inference_disabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\x11\n\x0fresource_config\"\xb7\x04\n\x13\x44\x61taDiscoveryResult\x12\x62\n\x13\x62igquery_publishing\x18\x01 \x01(\x0b\x32@.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishingB\x03\xe0\x41\x03\x12Z\n\x0fscan_statistics\x18\x02 \x01(\x0b\x32<.google.cloud.dataplex.v1.DataDiscoveryResult.ScanStatisticsB\x03\xe0\x41\x03\x1a\x65\n\x12\x42igQueryPublishing\x12\x38\n\x07\x64\x61taset\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x62igquery.googleapis.com/Dataset\x12\x15\n\x08location\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\xf8\x01\n\x0eScanStatistics\x12\x1a\n\x12scanned_file_count\x18\x01 \x01(\x05\x12\x1c\n\x14\x64\x61ta_processed_bytes\x18\x02 \x01(\x03\x12\x16\n\x0e\x66iles_excluded\x18\x03 \x01(\x05\x12\x16\n\x0etables_created\x18\x04 \x01(\x05\x12\x16\n\x0etables_deleted\x18\x05 \x01(\x05\x12\x16\n\x0etables_updated\x18\x06 \x01(\x05\x12\x18\n\x10\x66ilesets_created\x18\x07 \x01(\x05\x12\x18\n\x10\x66ilesets_deleted\x18\x08 \x01(\x05\x12\x18\n\x10\x66ilesets_updated\x18\t \x01(\x05\x42\xac\x02\n\x1c\x63om.google.cloud.dataplex.v1B\x12\x44\x61taDiscoveryProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xea\x41H\n\x1f\x62igquery.googleapis.com/Dataset\x12%projects/{project}/datasets/{dataset}\xea\x41p\n,bigqueryconnection.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}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 = [ - ] - 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_documentation_pb.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb index 3ec0bf9e77f0..d845a62b4328 100644 --- a/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb +++ b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb @@ -7,37 +7,17 @@ require 'google/api/field_behavior_pb' -descriptor_data = "\n1google/cloud/dataplex/v1/data_documentation.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x17\n\x15\x44\x61taDocumentationSpec\"\xe9\x04\n\x17\x44\x61taDocumentationResult\x12Z\n\x0ctable_result\x18\x08 \x01(\x0b\x32=.google.cloud.dataplex.v1.DataDocumentationResult.TableResultB\x03\xe0\x41\x03H\x00\x1a\xd5\x01\n\x0bTableResult\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08overview\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12M\n\x06schema\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataDocumentationResult.SchemaB\x03\xe0\x41\x03\x12M\n\x07queries\x18\x04 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.QueryB\x03\xe0\x41\x03\x1a\x33\n\x05Query\x12\x10\n\x03sql\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1aV\n\x06Schema\x12L\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.FieldB\x03\xe0\x41\x03\x1a\x82\x01\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12L\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.FieldB\x03\xe0\x41\x03\x42\x08\n\x06resultBr\n\x1c\x63om.google.cloud.dataplex.v1B\x16\x44\x61taDocumentationProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" +descriptor_data = "\n1google/cloud/dataplex/v1/data_documentation.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x93\x02\n\x15\x44\x61taDocumentationSpec\x12\'\n\x1a\x63\x61talog_publishing_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12_\n\x11generation_scopes\x18\x03 \x03(\x0e\x32?.google.cloud.dataplex.v1.DataDocumentationSpec.GenerationScopeB\x03\xe0\x41\x01\"p\n\x0fGenerationScope\x12 \n\x1cGENERATION_SCOPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12!\n\x1dTABLE_AND_COLUMN_DESCRIPTIONS\x10\x02\x12\x0f\n\x0bSQL_QUERIES\x10\x03\"\xe9\x04\n\x17\x44\x61taDocumentationResult\x12Z\n\x0ctable_result\x18\x08 \x01(\x0b\x32=.google.cloud.dataplex.v1.DataDocumentationResult.TableResultB\x03\xe0\x41\x03H\x00\x1a\xd5\x01\n\x0bTableResult\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08overview\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12M\n\x06schema\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataDocumentationResult.SchemaB\x03\xe0\x41\x03\x12M\n\x07queries\x18\x04 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.QueryB\x03\xe0\x41\x03\x1a\x33\n\x05Query\x12\x10\n\x03sql\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1aV\n\x06Schema\x12L\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.FieldB\x03\xe0\x41\x03\x1a\x82\x01\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12L\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.FieldB\x03\xe0\x41\x03\x42\x08\n\x06resultBr\n\x1c\x63om.google.cloud.dataplex.v1B\x16\x44\x61taDocumentationProtoP\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 module Dataplex module V1 DataDocumentationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationSpec").msgclass + DataDocumentationSpec::GenerationScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationSpec.GenerationScope").enummodule DataDocumentationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult").msgclass DataDocumentationResult::TableResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.TableResult").msgclass DataDocumentationResult::Query = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.Query").msgclass diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/client.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/client.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/credentials.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/operations.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/operations.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/paths.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/client.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/operations.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb b/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_product_service/rest/service_stub.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_pb.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_pb.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_services_pb.rb rename to google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_products_services_pb.rb 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/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/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_products.rb rename to google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_products.rb 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/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb b/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_feed.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb b/google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/delete_metadata_feed.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb b/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_feed.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb b/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_feeds.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb b/google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/lookup_context.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb b/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry_links.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb b/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/update_entry_link.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb b/google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb rename to google-cloud-dataplex-v1/snippets/catalog_service/update_metadata_feed.rb diff --git a/google-cloud-dataplex-v1/snippets/content_service/create_content.rb b/google-cloud-dataplex-v1/snippets/content_service/create_content.rb deleted file mode 100644 index bdf4fe8dcf0a..000000000000 --- a/google-cloud-dataplex-v1/snippets/content_service/create_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_CreateContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#create_content. -# -def create_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateContentRequest.new - - # Call the create_content method. - result = client.create_content request - - # The returned object is of type Google::Cloud::Dataplex::V1::Content. - p result -end -# [END dataplex_v1_generated_ContentService_CreateContent_sync] diff --git a/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_content.rb b/google-cloud-dataplex-v1/snippets/content_service/get_content.rb deleted file mode 100644 index 9ca09e479316..000000000000 --- a/google-cloud-dataplex-v1/snippets/content_service/get_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_GetContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#get_content. -# -def get_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetContentRequest.new - - # Call the get_content method. - result = client.get_content request - - # The returned object is of type Google::Cloud::Dataplex::V1::Content. - p result -end -# [END dataplex_v1_generated_ContentService_GetContent_sync] diff --git a/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/list_content.rb b/google-cloud-dataplex-v1/snippets/content_service/list_content.rb deleted file mode 100644 index 8fcca141e14c..000000000000 --- a/google-cloud-dataplex-v1/snippets/content_service/list_content.rb +++ /dev/null @@ -1,51 +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_ListContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#list_content. -# -def list_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListContentRequest.new - - # Call the list_content method. - result = client.list_content request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Content. - p item - end -end -# [END dataplex_v1_generated_ContentService_ListContent_sync] diff --git a/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/content_service/test_iam_permissions.rb b/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.rb deleted file mode 100644 index 56979685d515..000000000000 --- a/google-cloud-dataplex-v1/snippets/content_service/test_iam_permissions.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_TestIamPermissions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the test_iam_permissions call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END dataplex_v1_generated_ContentService_TestIamPermissions_sync] diff --git a/google-cloud-dataplex-v1/snippets/content_service/update_content.rb b/google-cloud-dataplex-v1/snippets/content_service/update_content.rb deleted file mode 100644 index f2ea109d392a..000000000000 --- a/google-cloud-dataplex-v1/snippets/content_service/update_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_UpdateContent_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_content call in the ContentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::ContentService::Client#update_content. -# -def update_content - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::ContentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateContentRequest.new - - # Call the update_content method. - result = client.update_content request - - # The returned object is of type Google::Cloud::Dataplex::V1::Content. - p result -end -# [END dataplex_v1_generated_ContentService_UpdateContent_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb b/google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/create_data_asset.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/create_data_product.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/create_data_product.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_asset.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/delete_data_asset.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/delete_data_product.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/delete_data_product.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb b/google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/get_data_asset.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/get_data_product.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/get_data_product.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb b/google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/list_data_assets.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb b/google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/list_data_products.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/update_data_asset.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/update_data_asset.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/snippets/data_product_service/update_data_product.rb rename to google-cloud-dataplex-v1/snippets/data_product_service/update_data_product.rb diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb b/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb deleted file mode 100644 index b6fb80cea65b..000000000000 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/create_environment.rb +++ /dev/null @@ -1,54 +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_DataplexService_CreateEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_environment. -# -def create_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEnvironmentRequest.new - - # Call the create_environment method. - result = client.create_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateEnvironment_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb b/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb deleted file mode 100644 index 6c4ad993561a..000000000000 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/delete_environment.rb +++ /dev/null @@ -1,54 +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_DataplexService_DeleteEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_environment. -# -def delete_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEnvironmentRequest.new - - # Call the delete_environment method. - result = client.delete_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb b/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.rb deleted file mode 100644 index 67e74c93fbab..000000000000 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/get_environment.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_DataplexService_GetEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_environment. -# -def get_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEnvironmentRequest.new - - # Call the get_environment method. - result = client.get_environment request - - # The returned object is of type Google::Cloud::Dataplex::V1::Environment. - p result -end -# [END dataplex_v1_generated_DataplexService_GetEnvironment_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb b/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb deleted file mode 100644 index cbe5fba5c88f..000000000000 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/list_environments.rb +++ /dev/null @@ -1,51 +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_DataplexService_ListEnvironments_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_environments call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_environments. -# -def list_environments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEnvironmentsRequest.new - - # Call the list_environments method. - result = client.list_environments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Environment. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListEnvironments_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb b/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb deleted file mode 100644 index da0322aca341..000000000000 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/list_sessions.rb +++ /dev/null @@ -1,51 +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_DataplexService_ListSessions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_sessions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_sessions. -# -def list_sessions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListSessionsRequest.new - - # Call the list_sessions method. - result = client.list_sessions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Session. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListSessions_sync] diff --git a/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb b/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb deleted file mode 100644 index b460d4726204..000000000000 --- a/google-cloud-dataplex-v1/snippets/dataplex_service/update_environment.rb +++ /dev/null @@ -1,54 +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_DataplexService_UpdateEnvironment_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_environment call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_environment. -# -def update_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEnvironmentRequest.new - - # Call the update_environment method. - result = client.update_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] diff --git a/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_paths_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb deleted file mode 100644 index 85184dae84cb..000000000000 --- a/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_paths_test.rb +++ /dev/null @@ -1,67 +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_service" - -class ::Google::Cloud::Dataplex::V1::ContentService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_content_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.content_path project: "value0", location: "value1", lake: "value2", content: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/content/value3", path - end - end - - def test_lake_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lake_path project: "value0", location: "value1", lake: "value2" - assert_equal "projects/value0/locations/value1/lakes/value2", path - end - end -end diff --git a/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 index 9faa9eddd6fe..9d228a3b32d6 100644 --- 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 @@ -63,499 +63,6 @@ def logger 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 diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_operations_test.rb rename to google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_operations_test.rb diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb b/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb rename to google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_paths_test.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_rest_test.rb rename to google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_rest_test.rb diff --git a/owl-bot-staging/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 similarity index 100% rename from owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_test.rb rename to google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_product_service_test.rb 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" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.gitignore b/owl-bot-staging/google-cloud-dataplex-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json deleted file mode 100644 index 70ddbcadde04..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "dataplex.googleapis.com", - "api_shortname": "dataplex", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest", - "distribution_name": "google-cloud-dataplex-v1", - "is_cloud": true, - "language": "ruby", - "name": "dataplex", - "name_pretty": "Dataplex V1 API", - "product_documentation": "https://cloud.google.com/dataplex/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/dataplex/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml b/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml deleted file mode 100644 index 029e6a990334..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-dataplex-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-dataplex-v1.rb" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb b/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# 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! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/.yardopts b/owl-bot-staging/google-cloud-dataplex-v1/.yardopts deleted file mode 100644 index 610ce5201635..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Dataplex V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md deleted file mode 100644 index 1c60fe75f8a9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-dataplex-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-dataplex-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/dataplex/v1" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/dataplex/v1" - -::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-dataplex-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/dataplex/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -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/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md b/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/README.md b/owl-bot-staging/google-cloud-dataplex-v1/README.md deleted file mode 100644 index e2ffd93371eb..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Dataplex V1 API - -A unified, intelligent governance solution for data and AI assets. - -Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Dataplex V1 API. Most users should consider using -the main client gem, -[google-cloud-dataplex](https://rubygems.org/gems/google-cloud-dataplex). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-dataplex-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/dataplex.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/dataplex/v1" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new -request = ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new # (request fields as keyword arguments...) -response = client.create_lake request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataplex-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/dataplex/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/dataplex/v1" -require "logger" - -client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-dataplex`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-dataplex-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-dataplex`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-dataplex-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/Rakefile b/owl-bot-staging/google-cloud-dataplex-v1/Rakefile deleted file mode 100644 index 4ff988d7752e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# 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 "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-dataplex-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/dataplex/v1/dataplex_service/credentials" - ::Google::Cloud::Dataplex::V1::DataplexService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-dataplex-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-dataplex-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-dataplex-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-dataplex-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-dataplex-v1" - header "google-cloud-dataplex-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-dataplex-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-dataplex-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-dataplex-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-dataplex-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json deleted file mode 100644 index cbf3c56fe31b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/gapic_metadata.json +++ /dev/null @@ -1,724 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.dataplex.v1", - "libraryPackage": "::Google::Cloud::Dataplex::V1", - "services": { - "DataplexService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataplexService::Client", - "rpcs": { - "CreateLake": { - "methods": [ - "create_lake" - ] - }, - "UpdateLake": { - "methods": [ - "update_lake" - ] - }, - "DeleteLake": { - "methods": [ - "delete_lake" - ] - }, - "ListLakes": { - "methods": [ - "list_lakes" - ] - }, - "GetLake": { - "methods": [ - "get_lake" - ] - }, - "ListLakeActions": { - "methods": [ - "list_lake_actions" - ] - }, - "CreateZone": { - "methods": [ - "create_zone" - ] - }, - "UpdateZone": { - "methods": [ - "update_zone" - ] - }, - "DeleteZone": { - "methods": [ - "delete_zone" - ] - }, - "ListZones": { - "methods": [ - "list_zones" - ] - }, - "GetZone": { - "methods": [ - "get_zone" - ] - }, - "ListZoneActions": { - "methods": [ - "list_zone_actions" - ] - }, - "CreateAsset": { - "methods": [ - "create_asset" - ] - }, - "UpdateAsset": { - "methods": [ - "update_asset" - ] - }, - "DeleteAsset": { - "methods": [ - "delete_asset" - ] - }, - "ListAssets": { - "methods": [ - "list_assets" - ] - }, - "GetAsset": { - "methods": [ - "get_asset" - ] - }, - "ListAssetActions": { - "methods": [ - "list_asset_actions" - ] - }, - "CreateTask": { - "methods": [ - "create_task" - ] - }, - "UpdateTask": { - "methods": [ - "update_task" - ] - }, - "DeleteTask": { - "methods": [ - "delete_task" - ] - }, - "ListTasks": { - "methods": [ - "list_tasks" - ] - }, - "GetTask": { - "methods": [ - "get_task" - ] - }, - "ListJobs": { - "methods": [ - "list_jobs" - ] - }, - "RunTask": { - "methods": [ - "run_task" - ] - }, - "GetJob": { - "methods": [ - "get_job" - ] - }, - "CancelJob": { - "methods": [ - "cancel_job" - ] - } - } - } - } - }, - "BusinessGlossaryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client", - "rpcs": { - "CreateGlossary": { - "methods": [ - "create_glossary" - ] - }, - "UpdateGlossary": { - "methods": [ - "update_glossary" - ] - }, - "DeleteGlossary": { - "methods": [ - "delete_glossary" - ] - }, - "GetGlossary": { - "methods": [ - "get_glossary" - ] - }, - "ListGlossaries": { - "methods": [ - "list_glossaries" - ] - }, - "CreateGlossaryCategory": { - "methods": [ - "create_glossary_category" - ] - }, - "UpdateGlossaryCategory": { - "methods": [ - "update_glossary_category" - ] - }, - "DeleteGlossaryCategory": { - "methods": [ - "delete_glossary_category" - ] - }, - "GetGlossaryCategory": { - "methods": [ - "get_glossary_category" - ] - }, - "ListGlossaryCategories": { - "methods": [ - "list_glossary_categories" - ] - }, - "CreateGlossaryTerm": { - "methods": [ - "create_glossary_term" - ] - }, - "UpdateGlossaryTerm": { - "methods": [ - "update_glossary_term" - ] - }, - "DeleteGlossaryTerm": { - "methods": [ - "delete_glossary_term" - ] - }, - "GetGlossaryTerm": { - "methods": [ - "get_glossary_term" - ] - }, - "ListGlossaryTerms": { - "methods": [ - "list_glossary_terms" - ] - } - } - } - } - }, - "CatalogService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::CatalogService::Client", - "rpcs": { - "CreateEntryType": { - "methods": [ - "create_entry_type" - ] - }, - "UpdateEntryType": { - "methods": [ - "update_entry_type" - ] - }, - "DeleteEntryType": { - "methods": [ - "delete_entry_type" - ] - }, - "ListEntryTypes": { - "methods": [ - "list_entry_types" - ] - }, - "GetEntryType": { - "methods": [ - "get_entry_type" - ] - }, - "CreateAspectType": { - "methods": [ - "create_aspect_type" - ] - }, - "UpdateAspectType": { - "methods": [ - "update_aspect_type" - ] - }, - "DeleteAspectType": { - "methods": [ - "delete_aspect_type" - ] - }, - "ListAspectTypes": { - "methods": [ - "list_aspect_types" - ] - }, - "GetAspectType": { - "methods": [ - "get_aspect_type" - ] - }, - "CreateEntryGroup": { - "methods": [ - "create_entry_group" - ] - }, - "UpdateEntryGroup": { - "methods": [ - "update_entry_group" - ] - }, - "DeleteEntryGroup": { - "methods": [ - "delete_entry_group" - ] - }, - "ListEntryGroups": { - "methods": [ - "list_entry_groups" - ] - }, - "GetEntryGroup": { - "methods": [ - "get_entry_group" - ] - }, - "CreateEntry": { - "methods": [ - "create_entry" - ] - }, - "UpdateEntry": { - "methods": [ - "update_entry" - ] - }, - "DeleteEntry": { - "methods": [ - "delete_entry" - ] - }, - "ListEntries": { - "methods": [ - "list_entries" - ] - }, - "GetEntry": { - "methods": [ - "get_entry" - ] - }, - "LookupEntry": { - "methods": [ - "lookup_entry" - ] - }, - "SearchEntries": { - "methods": [ - "search_entries" - ] - }, - "CreateMetadataJob": { - "methods": [ - "create_metadata_job" - ] - }, - "GetMetadataJob": { - "methods": [ - "get_metadata_job" - ] - }, - "ListMetadataJobs": { - "methods": [ - "list_metadata_jobs" - ] - }, - "CancelMetadataJob": { - "methods": [ - "cancel_metadata_job" - ] - }, - "CreateEntryLink": { - "methods": [ - "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" - ] - } - } - } - } - }, - "CmekService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::CmekService::Client", - "rpcs": { - "CreateEncryptionConfig": { - "methods": [ - "create_encryption_config" - ] - }, - "UpdateEncryptionConfig": { - "methods": [ - "update_encryption_config" - ] - }, - "DeleteEncryptionConfig": { - "methods": [ - "delete_encryption_config" - ] - }, - "ListEncryptionConfigs": { - "methods": [ - "list_encryption_configs" - ] - }, - "GetEncryptionConfig": { - "methods": [ - "get_encryption_config" - ] - } - } - } - } - }, - "ContentService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::ContentService::Client", - "rpcs": {} - } - } - }, - "DataProductService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataProductService::Client", - "rpcs": { - "CreateDataProduct": { - "methods": [ - "create_data_product" - ] - }, - "DeleteDataProduct": { - "methods": [ - "delete_data_product" - ] - }, - "GetDataProduct": { - "methods": [ - "get_data_product" - ] - }, - "ListDataProducts": { - "methods": [ - "list_data_products" - ] - }, - "UpdateDataProduct": { - "methods": [ - "update_data_product" - ] - }, - "CreateDataAsset": { - "methods": [ - "create_data_asset" - ] - }, - "UpdateDataAsset": { - "methods": [ - "update_data_asset" - ] - }, - "DeleteDataAsset": { - "methods": [ - "delete_data_asset" - ] - }, - "GetDataAsset": { - "methods": [ - "get_data_asset" - ] - }, - "ListDataAssets": { - "methods": [ - "list_data_assets" - ] - } - } - } - } - }, - "DataTaxonomyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client", - "rpcs": { - "CreateDataTaxonomy": { - "methods": [ - "create_data_taxonomy" - ] - }, - "UpdateDataTaxonomy": { - "methods": [ - "update_data_taxonomy" - ] - }, - "DeleteDataTaxonomy": { - "methods": [ - "delete_data_taxonomy" - ] - }, - "ListDataTaxonomies": { - "methods": [ - "list_data_taxonomies" - ] - }, - "GetDataTaxonomy": { - "methods": [ - "get_data_taxonomy" - ] - }, - "CreateDataAttributeBinding": { - "methods": [ - "create_data_attribute_binding" - ] - }, - "UpdateDataAttributeBinding": { - "methods": [ - "update_data_attribute_binding" - ] - }, - "DeleteDataAttributeBinding": { - "methods": [ - "delete_data_attribute_binding" - ] - }, - "ListDataAttributeBindings": { - "methods": [ - "list_data_attribute_bindings" - ] - }, - "GetDataAttributeBinding": { - "methods": [ - "get_data_attribute_binding" - ] - }, - "CreateDataAttribute": { - "methods": [ - "create_data_attribute" - ] - }, - "UpdateDataAttribute": { - "methods": [ - "update_data_attribute" - ] - }, - "DeleteDataAttribute": { - "methods": [ - "delete_data_attribute" - ] - }, - "ListDataAttributes": { - "methods": [ - "list_data_attributes" - ] - }, - "GetDataAttribute": { - "methods": [ - "get_data_attribute" - ] - } - } - } - } - }, - "DataScanService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::DataScanService::Client", - "rpcs": { - "CreateDataScan": { - "methods": [ - "create_data_scan" - ] - }, - "UpdateDataScan": { - "methods": [ - "update_data_scan" - ] - }, - "DeleteDataScan": { - "methods": [ - "delete_data_scan" - ] - }, - "GetDataScan": { - "methods": [ - "get_data_scan" - ] - }, - "ListDataScans": { - "methods": [ - "list_data_scans" - ] - }, - "RunDataScan": { - "methods": [ - "run_data_scan" - ] - }, - "GetDataScanJob": { - "methods": [ - "get_data_scan_job" - ] - }, - "ListDataScanJobs": { - "methods": [ - "list_data_scan_jobs" - ] - }, - "GenerateDataQualityRules": { - "methods": [ - "generate_data_quality_rules" - ] - } - } - } - } - }, - "MetadataService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Dataplex::V1::MetadataService::Client", - "rpcs": { - "CreateEntity": { - "methods": [ - "create_entity" - ] - }, - "UpdateEntity": { - "methods": [ - "update_entity" - ] - }, - "DeleteEntity": { - "methods": [ - "delete_entity" - ] - }, - "GetEntity": { - "methods": [ - "get_entity" - ] - }, - "ListEntities": { - "methods": [ - "list_entities" - ] - }, - "CreatePartition": { - "methods": [ - "create_partition" - ] - }, - "DeletePartition": { - "methods": [ - "delete_partition" - ] - }, - "GetPartition": { - "methods": [ - "get_partition" - ] - }, - "ListPartitions": { - "methods": [ - "list_partitions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec b/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec deleted file mode 100644 index 9471bd20f65e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/google-cloud-dataplex-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/dataplex/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-dataplex-v1" - gem.version = Google::Cloud::Dataplex::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Dataplex is an intelligent data fabric that provides a way to centrally manage, monitor, and govern your data across data lakes, data warehouses and data marts, and make this data securely accessible to a variety of analytics and data science tools. Note that google-cloud-dataplex-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-dataplex instead. See the readme for more details." - gem.summary = "A unified, intelligent governance solution for data and AI assets." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb deleted file mode 100644 index 1b46c3bbc688..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google-cloud-dataplex-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/dataplex/v1" diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb deleted file mode 100644 index fe5cff31a148..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1.rb +++ /dev/null @@ -1,53 +0,0 @@ -# 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 "google/cloud/dataplex/v1/dataplex_service" -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" -require "google/cloud/dataplex/v1/version" - -module Google - module Cloud - module Dataplex - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/dataplex/v1" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/dataplex/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb deleted file mode 100644 index 6d49a5c634de..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/analyze_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/analyze.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/analyze.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\r\n\x0b\x45nvironment\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#dataplex.googleapis.com/Environment\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x06 \x03(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12Z\n\x13infrastructure_spec\x18\x64 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Environment.InfrastructureSpecB\x03\xe0\x41\x02\x12L\n\x0csession_spec\x18\x65 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Environment.SessionSpecB\x03\xe0\x41\x01\x12P\n\x0esession_status\x18\x66 \x01(\x0b\x32\x33.google.cloud.dataplex.v1.Environment.SessionStatusB\x03\xe0\x41\x03\x12H\n\tendpoints\x18\xc8\x01 \x01(\x0b\x32/.google.cloud.dataplex.v1.Environment.EndpointsB\x03\xe0\x41\x03\x1a\xe5\x04\n\x12InfrastructureSpec\x12\x61\n\x07\x63ompute\x18\x32 \x01(\x0b\x32I.google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResourcesB\x03\xe0\x41\x01H\x00\x12`\n\x08os_image\x18\x64 \x01(\x0b\x32G.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntimeB\x03\xe0\x41\x02H\x01\x1a\x63\n\x10\x43omputeResources\x12\x19\n\x0c\x64isk_size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\nnode_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1b\n\x0emax_node_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x8c\x02\n\x0eOsImageRuntime\x12\x1a\n\rimage_version\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0ejava_libraries\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\tresourcesB\t\n\x07runtime\x1aj\n\x0bSessionSpec\x12\x39\n\x11max_idle_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12 \n\x13\x65nable_fast_startup\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a$\n\rSessionStatus\x12\x13\n\x06\x61\x63tive\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x1a\x35\n\tEndpoints\x12\x16\n\tnotebooks\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03sql\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:y\xea\x41v\n#dataplex.googleapis.com/Environment\x12Oprojects/{project}/locations/{location}/lakes/{lake}/environments/{environment}\"\xa6\x07\n\x07\x43ontent\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x06 \x03(\x0b\x32-.google.cloud.dataplex.v1.Content.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\tdata_text\x18\t \x01(\tB\x03\xe0\x41\x02H\x00\x12\x41\n\nsql_script\x18\x64 \x01(\x0b\x32+.google.cloud.dataplex.v1.Content.SqlScriptH\x01\x12>\n\x08notebook\x18\x65 \x01(\x0b\x32*.google.cloud.dataplex.v1.Content.NotebookH\x01\x1a\x91\x01\n\tSqlScript\x12L\n\x06\x65ngine\x18\x01 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Content.SqlScript.QueryEngineB\x03\xe0\x41\x02\"6\n\x0bQueryEngine\x12\x1c\n\x18QUERY_ENGINE_UNSPECIFIED\x10\x00\x12\t\n\x05SPARK\x10\x02\x1a\x93\x01\n\x08Notebook\x12O\n\x0bkernel_type\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Content.Notebook.KernelTypeB\x03\xe0\x41\x02\"6\n\nKernelType\x12\x1b\n\x17KERNEL_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PYTHON3\x10\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:l\xea\x41i\n\x1f\x64\x61taplex.googleapis.com/Content\x12\x46projects/{project}/locations/{location}/lakes/{lake}/content/{content}B\x06\n\x04\x64\x61taB\t\n\x07\x63ontent\"\xcd\x02\n\x07Session\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x14\n\x07user_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\x05state\x18\x04 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03:\x89\x01\xea\x41\x85\x01\n\x1f\x64\x61taplex.googleapis.com/Session\x12\x62projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}Bh\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x41nalyzeProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment").msgclass - Environment::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec").msgclass - Environment::InfrastructureSpec::ComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources").msgclass - Environment::InfrastructureSpec::OsImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime").msgclass - Environment::SessionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionSpec").msgclass - Environment::SessionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.SessionStatus").msgclass - Environment::Endpoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Environment.Endpoints").msgclass - Content = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content").msgclass - Content::SqlScript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript").msgclass - Content::SqlScript::QueryEngine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.SqlScript.QueryEngine").enummodule - Content::Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook").msgclass - Content::Notebook::KernelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Content.Notebook.KernelType").enummodule - Session = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Session").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb deleted file mode 100644 index 06c65ac5d59f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/bindings_override.rb +++ /dev/null @@ -1,564 +0,0 @@ -# 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/rest" - -module Google - module Cloud - module Dataplex - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/dataplex/v1/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/changeRequests/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/changeRequests/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/changeRequests/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataProducts/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb deleted file mode 100644 index 59ae9aa66345..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/business_glossary.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 = "\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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - Glossary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Glossary").msgclass - GlossaryCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GlossaryCategory").msgclass - GlossaryTerm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GlossaryTerm").msgclass - CreateGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateGlossaryRequest").msgclass - UpdateGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateGlossaryRequest").msgclass - DeleteGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteGlossaryRequest").msgclass - GetGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetGlossaryRequest").msgclass - ListGlossariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossariesRequest").msgclass - ListGlossariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossariesResponse").msgclass - CreateGlossaryCategoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateGlossaryCategoryRequest").msgclass - UpdateGlossaryCategoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateGlossaryCategoryRequest").msgclass - DeleteGlossaryCategoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteGlossaryCategoryRequest").msgclass - GetGlossaryCategoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetGlossaryCategoryRequest").msgclass - ListGlossaryCategoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossaryCategoriesRequest").msgclass - ListGlossaryCategoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossaryCategoriesResponse").msgclass - CreateGlossaryTermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateGlossaryTermRequest").msgclass - UpdateGlossaryTermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateGlossaryTermRequest").msgclass - DeleteGlossaryTermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteGlossaryTermRequest").msgclass - GetGlossaryTermRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetGlossaryTermRequest").msgclass - ListGlossaryTermsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossaryTermsRequest").msgclass - ListGlossaryTermsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListGlossaryTermsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service.rb deleted file mode 100644 index fcb2e4dd0971..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service.rb +++ /dev/null @@ -1,61 +0,0 @@ -# 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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/business_glossary_service/credentials" -require "google/cloud/dataplex/v1/business_glossary_service/paths" -require "google/cloud/dataplex/v1/business_glossary_service/operations" -require "google/cloud/dataplex/v1/business_glossary_service/client" -require "google/cloud/dataplex/v1/business_glossary_service/rest" - -module Google - module Cloud - module Dataplex - module V1 - ## - # BusinessGlossaryService provides APIs for managing business glossary - # resources for enterprise customers. - # The resources currently supported in Business Glossary are: - # 1. Glossary - # 2. GlossaryCategory - # 3. GlossaryTerm - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/business_glossary_service" - # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/business_glossary_service/rest" - # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - module BusinessGlossaryService - end - end - end - end -end - -helper_path = ::File.join __dir__, "business_glossary_service", "helpers.rb" -require "google/cloud/dataplex/v1/business_glossary_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb deleted file mode 100644 index 183b4fa27724..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/client.rb +++ /dev/null @@ -1,2002 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/business_glossary_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module BusinessGlossaryService - ## - # Client for the BusinessGlossaryService service. - # - # BusinessGlossaryService provides APIs for managing business glossary - # resources for enterprise customers. - # The resources currently supported in Business Glossary are: - # 1. Glossary - # 2. GlossaryCategory - # 3. GlossaryTerm - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_glossary_service_stub - - ## - # Configure the BusinessGlossaryService Client class. - # - # See {::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessGlossaryService clients - # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessGlossaryService 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::BusinessGlossaryService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_glossary_service_stub.universe_domain - end - - ## - # Create a new BusinessGlossaryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessGlossaryService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/business_glossary_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @business_glossary_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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, - logger: @config.logger - ) - - @business_glossary_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @business_glossary_service_stub.endpoint - config.universe_domain = @business_glossary_service_stub.universe_domain - config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @business_glossary_service_stub.endpoint - config.universe_domain = @business_glossary_service_stub.universe_domain - config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @business_glossary_service_stub.logger - end - - # Service calls - - ## - # Creates a new Glossary resource. - # - # @overload create_glossary(request, options = nil) - # Pass arguments to `create_glossary` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary(parent: nil, glossary_id: nil, glossary: nil, validate_only: nil) - # Pass arguments to `create_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Glossary will be created. - # Format: projects/\\{project_id_or_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param glossary_id [::String] - # Required. Glossary ID: Glossary identifier. - # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash] - # Required. The Glossary to create. - # @param validate_only [::Boolean] - # Optional. Validates the request without actually creating the Glossary. - # Default: 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::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new - # - # # Call the create_glossary method. - # result = client.create_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest - - # Converts hash and nil to 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_glossary.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_glossary.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :create_glossary, 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 Glossary resource. - # - # @overload update_glossary(request, options = nil) - # Pass arguments to `update_glossary` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary(glossary: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash] - # Required. The Glossary to update. - # The Glossary's `name` field is used to identify the Glossary to update. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @param validate_only [::Boolean] - # Optional. Validates the request without actually updating the Glossary. - # Default: 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::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new - # - # # Call the update_glossary method. - # result = client.update_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest - - # Converts hash and nil to 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_glossary.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.glossary&.name - header_params["glossary.name"] = request.glossary.name - end - - request_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_glossary.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :update_glossary, 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 Glossary resource. All the categories and terms within the - # Glossary must be deleted before the Glossary can be deleted. - # - # @overload delete_glossary(request, options = nil) - # Pass arguments to `delete_glossary` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary(name: nil, etag: nil) - # Pass arguments to `delete_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Glossary to delete. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # @param etag [::String] - # Optional. The etag of the Glossary. - # 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. - # - # @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::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new - # - # # Call the delete_glossary method. - # result = client.delete_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest - - # Converts hash and nil to 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_glossary.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_glossary.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :delete_glossary, 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 Glossary resource. - # - # @overload get_glossary(request, options = nil) - # Pass arguments to `get_glossary` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary(name: nil) - # Pass arguments to `get_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Glossary to retrieve. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Glossary] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Glossary] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetGlossaryRequest.new - # - # # Call the get_glossary method. - # result = client.get_glossary request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Glossary. - # p result - # - def get_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryRequest - - # Converts hash and nil to 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_glossary.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_glossary.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :get_glossary, 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 Glossary resources in a project and location. - # - # @overload list_glossaries(request, options = nil) - # Pass arguments to `list_glossaries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListGlossariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListGlossariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_glossaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which has this collection of Glossaries. - # Format: projects/\\{project_id_or_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. The maximum number of Glossaries to return. The service may - # return fewer than this value. If unspecified, at most 50 Glossaries 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 `ListGlossaries` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListGlossaries` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. Filter expression that filters Glossaries listed in the response. - # Filters on proto fields of Glossary are supported. - # Examples of using a filter are: - # - `display_name="my-glossary"` - # - `categoryCount=1` - # - `termCount=0` - # @param order_by [::String] - # Optional. Order by expression that orders Glossaries listed in the - # response. Order by fields are: `name` or `create_time` for the result. If - # not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListGlossariesRequest.new - # - # # Call the list_glossaries method. - # result = client.list_glossaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Glossary. - # p item - # end - # - def list_glossaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossariesRequest - - # Converts hash and nil to 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_glossaries.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_glossaries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_glossaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :list_glossaries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossaries, 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 - - ## - # Creates a new GlossaryCategory resource. - # - # @overload create_glossary_category(request, options = nil) - # Pass arguments to `create_glossary_category` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_category(parent: nil, category_id: nil, category: nil) - # Pass arguments to `create_glossary_category` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryCategory will be created. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # where `locationId` refers to a Google Cloud region. - # @param category_id [::String] - # Required. GlossaryCategory identifier. - # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash] - # Required. The GlossaryCategory to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new - # - # # Call the create_glossary_category method. - # result = client.create_glossary_category request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. - # p result - # - def create_glossary_category request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest - - # Converts hash and nil to 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_glossary_category.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_glossary_category.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_glossary_category.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :create_glossary_category, 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 - - ## - # Updates a GlossaryCategory resource. - # - # @overload update_glossary_category(request, options = nil) - # Pass arguments to `update_glossary_category` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_category(category: nil, update_mask: nil) - # Pass arguments to `update_glossary_category` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash] - # Required. The GlossaryCategory to update. - # The GlossaryCategory's `name` field is used to identify the - # GlossaryCategory to update. Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new - # - # # Call the update_glossary_category method. - # result = client.update_glossary_category request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. - # p result - # - def update_glossary_category request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest - - # Converts hash and nil to 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_glossary_category.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.category&.name - header_params["category.name"] = request.category.name - end - - request_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_glossary_category.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_glossary_category.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :update_glossary_category, 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 a GlossaryCategory resource. All the GlossaryCategories and - # GlossaryTerms nested directly under the specified GlossaryCategory will be - # moved one level up to the parent in the hierarchy. - # - # @overload delete_glossary_category(request, options = nil) - # Pass arguments to `delete_glossary_category` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_category(name: nil) - # Pass arguments to `delete_glossary_category` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryCategory to delete. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new - # - # # Call the delete_glossary_category method. - # result = client.delete_glossary_category request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_glossary_category request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest - - # Converts hash and nil to 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_glossary_category.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_glossary_category.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_glossary_category.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :delete_glossary_category, 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 a GlossaryCategory resource. - # - # @overload get_glossary_category(request, options = nil) - # Pass arguments to `get_glossary_category` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_category(name: nil) - # Pass arguments to `get_glossary_category` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryCategory to retrieve. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new - # - # # Call the get_glossary_category method. - # result = client.get_glossary_category request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. - # p result - # - def get_glossary_category request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest - - # Converts hash and nil to 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_glossary_category.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_glossary_category.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_glossary_category.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :get_glossary_category, 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 GlossaryCategory resources in a Glossary. - # - # @overload list_glossary_categories(request, options = nil) - # Pass arguments to `list_glossary_categories` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_categories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_glossary_categories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which has this collection of GlossaryCategories. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # Location is the Google Cloud region. - # @param page_size [::Integer] - # Optional. The maximum number of GlossaryCategories to return. The service - # may return fewer than this value. If unspecified, at most 50 - # GlossaryCategories 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 `ListGlossaryCategories` - # call. Provide this to retrieve the subsequent page. When paginating, all - # other parameters provided to `ListGlossaryCategories` must match the call - # that provided the page token. - # @param filter [::String] - # Optional. Filter expression that filters GlossaryCategories listed in the - # response. Filters are supported on the following fields: - # - immediate_parent - # - # Examples of using a filter are: - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` - # - # This will only return the GlossaryCategories that are directly nested - # under the specified parent. - # @param order_by [::String] - # Optional. Order by expression that orders GlossaryCategories listed in the - # response. Order by fields are: `name` or `create_time` for the result. If - # not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.new - # - # # Call the list_glossary_categories method. - # result = client.list_glossary_categories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryCategory. - # p item - # end - # - def list_glossary_categories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest - - # Converts hash and nil to 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_glossary_categories.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_glossary_categories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_glossary_categories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :list_glossary_categories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_categories, 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 - - ## - # Creates a new GlossaryTerm resource. - # - # @overload create_glossary_term(request, options = nil) - # Pass arguments to `create_glossary_term` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_term(parent: nil, term_id: nil, term: nil) - # Pass arguments to `create_glossary_term` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the GlossaryTerm will be created. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # where `location_id` refers to a Google Cloud region. - # @param term_id [::String] - # Required. GlossaryTerm identifier. - # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash] - # Required. The GlossaryTerm to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new - # - # # Call the create_glossary_term method. - # result = client.create_glossary_term request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. - # p result - # - def create_glossary_term request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest - - # Converts hash and nil to 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_glossary_term.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_glossary_term.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_glossary_term.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :create_glossary_term, 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 - - ## - # Updates a GlossaryTerm resource. - # - # @overload update_glossary_term(request, options = nil) - # Pass arguments to `update_glossary_term` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_term(term: nil, update_mask: nil) - # Pass arguments to `update_glossary_term` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash] - # Required. The GlossaryTerm to update. - # The GlossaryTerm's `name` field is used to identify the GlossaryTerm to - # update. Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new - # - # # Call the update_glossary_term method. - # result = client.update_glossary_term request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. - # p result - # - def update_glossary_term request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest - - # Converts hash and nil to 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_glossary_term.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.term&.name - header_params["term.name"] = request.term.name - end - - request_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_glossary_term.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_glossary_term.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :update_glossary_term, 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 a GlossaryTerm resource. - # - # @overload delete_glossary_term(request, options = nil) - # Pass arguments to `delete_glossary_term` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_term(name: nil) - # Pass arguments to `delete_glossary_term` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryTerm to delete. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new - # - # # Call the delete_glossary_term method. - # result = client.delete_glossary_term request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_glossary_term request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest - - # Converts hash and nil to 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_glossary_term.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_glossary_term.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_glossary_term.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :delete_glossary_term, 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 a GlossaryTerm resource. - # - # @overload get_glossary_term(request, options = nil) - # Pass arguments to `get_glossary_term` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_term(name: nil) - # Pass arguments to `get_glossary_term` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryTerm to retrieve. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new - # - # # Call the get_glossary_term method. - # result = client.get_glossary_term request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. - # p result - # - def get_glossary_term request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest - - # Converts hash and nil to 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_glossary_term.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_glossary_term.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_glossary_term.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :get_glossary_term, 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 GlossaryTerm resources in a Glossary. - # - # @overload list_glossary_terms(request, options = nil) - # Pass arguments to `list_glossary_terms` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_terms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_glossary_terms` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which has this collection of GlossaryTerms. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. The maximum number of GlossaryTerms to return. The service may - # return fewer than this value. If unspecified, at most 50 GlossaryTerms 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 `ListGlossaryTerms` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListGlossaryTerms` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. Filter expression that filters GlossaryTerms listed in the - # response. Filters are supported on the following fields: - # - immediate_parent - # - # Examples of using a filter are: - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` - # - # This will only return the GlossaryTerms that are directly nested under the - # specified parent. - # @param order_by [::String] - # Optional. Order by expression that orders GlossaryTerms listed in the - # response. Order by fields are: `name` or `create_time` for the result. If - # not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.new - # - # # Call the list_glossary_terms method. - # result = client.list_glossary_terms request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryTerm. - # p item - # end - # - def list_glossary_terms request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest - - # Converts hash and nil to 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_glossary_terms.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_glossary_terms.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_glossary_terms.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.call_rpc :list_glossary_terms, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_terms, 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 BusinessGlossaryService API. - # - # This class represents the configuration for BusinessGlossaryService, - # 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::BusinessGlossaryService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_glossary to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_glossary.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_glossary.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::Cloud::Dataplex::V1::BusinessGlossaryService::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 BusinessGlossaryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary - ## - # RPC-specific configuration for `update_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary - ## - # RPC-specific configuration for `delete_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary - ## - # RPC-specific configuration for `get_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary - ## - # RPC-specific configuration for `list_glossaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossaries - ## - # RPC-specific configuration for `create_glossary_category` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary_category - ## - # RPC-specific configuration for `update_glossary_category` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary_category - ## - # RPC-specific configuration for `delete_glossary_category` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary_category - ## - # RPC-specific configuration for `get_glossary_category` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary_category - ## - # RPC-specific configuration for `list_glossary_categories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossary_categories - ## - # RPC-specific configuration for `create_glossary_term` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary_term - ## - # RPC-specific configuration for `update_glossary_term` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary_term - ## - # RPC-specific configuration for `delete_glossary_term` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary_term - ## - # RPC-specific configuration for `get_glossary_term` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary_term - ## - # RPC-specific configuration for `list_glossary_terms` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossary_terms - - # @private - def initialize parent_rpcs = nil - create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary - @create_glossary = ::Gapic::Config::Method.new create_glossary_config - update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary - @update_glossary = ::Gapic::Config::Method.new update_glossary_config - delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary - @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config - get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary - @get_glossary = ::Gapic::Config::Method.new get_glossary_config - list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries - @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config - create_glossary_category_config = parent_rpcs.create_glossary_category if parent_rpcs.respond_to? :create_glossary_category - @create_glossary_category = ::Gapic::Config::Method.new create_glossary_category_config - update_glossary_category_config = parent_rpcs.update_glossary_category if parent_rpcs.respond_to? :update_glossary_category - @update_glossary_category = ::Gapic::Config::Method.new update_glossary_category_config - delete_glossary_category_config = parent_rpcs.delete_glossary_category if parent_rpcs.respond_to? :delete_glossary_category - @delete_glossary_category = ::Gapic::Config::Method.new delete_glossary_category_config - get_glossary_category_config = parent_rpcs.get_glossary_category if parent_rpcs.respond_to? :get_glossary_category - @get_glossary_category = ::Gapic::Config::Method.new get_glossary_category_config - list_glossary_categories_config = parent_rpcs.list_glossary_categories if parent_rpcs.respond_to? :list_glossary_categories - @list_glossary_categories = ::Gapic::Config::Method.new list_glossary_categories_config - create_glossary_term_config = parent_rpcs.create_glossary_term if parent_rpcs.respond_to? :create_glossary_term - @create_glossary_term = ::Gapic::Config::Method.new create_glossary_term_config - update_glossary_term_config = parent_rpcs.update_glossary_term if parent_rpcs.respond_to? :update_glossary_term - @update_glossary_term = ::Gapic::Config::Method.new update_glossary_term_config - delete_glossary_term_config = parent_rpcs.delete_glossary_term if parent_rpcs.respond_to? :delete_glossary_term - @delete_glossary_term = ::Gapic::Config::Method.new delete_glossary_term_config - get_glossary_term_config = parent_rpcs.get_glossary_term if parent_rpcs.respond_to? :get_glossary_term - @get_glossary_term = ::Gapic::Config::Method.new get_glossary_term_config - list_glossary_terms_config = parent_rpcs.list_glossary_terms if parent_rpcs.respond_to? :list_glossary_terms - @list_glossary_terms = ::Gapic::Config::Method.new list_glossary_terms_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.rb deleted file mode 100644 index e626e6248b1a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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 "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module BusinessGlossaryService - # Credentials for the BusinessGlossaryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/operations.rb deleted file mode 100644 index e05a304394c8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# 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 BusinessGlossaryService - # 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 BusinessGlossaryService 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 BusinessGlossaryService 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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/paths.rb deleted file mode 100644 index 74144c722c39..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/paths.rb +++ /dev/null @@ -1,111 +0,0 @@ -# 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 - module BusinessGlossaryService - # Path helper methods for the BusinessGlossaryService API. - module Paths - ## - # Create a fully-qualified Glossary resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/glossaries/{glossary}` - # - # @param project [String] - # @param location [String] - # @param glossary [String] - # - # @return [::String] - def glossary_path project:, location:, glossary: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/glossaries/#{glossary}" - end - - ## - # Create a fully-qualified GlossaryCategory resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/glossaries/{glossary}/categories/{glossary_category}` - # - # @param project [String] - # @param location [String] - # @param glossary [String] - # @param glossary_category [String] - # - # @return [::String] - def glossary_category_path project:, location:, glossary:, glossary_category: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "glossary cannot contain /" if glossary.to_s.include? "/" - - "projects/#{project}/locations/#{location}/glossaries/#{glossary}/categories/#{glossary_category}" - end - - ## - # Create a fully-qualified GlossaryTerm resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/glossaries/{glossary}/terms/{glossary_term}` - # - # @param project [String] - # @param location [String] - # @param glossary [String] - # @param glossary_term [String] - # - # @return [::String] - def glossary_term_path project:, location:, glossary:, glossary_term: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "glossary cannot contain /" if glossary.to_s.include? "/" - - "projects/#{project}/locations/#{location}/glossaries/#{glossary}/terms/#{glossary_term}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest.rb deleted file mode 100644 index 1f31dc979ffb..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest.rb +++ /dev/null @@ -1,59 +0,0 @@ -# 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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/business_glossary_service/credentials" -require "google/cloud/dataplex/v1/business_glossary_service/paths" -require "google/cloud/dataplex/v1/business_glossary_service/rest/operations" -require "google/cloud/dataplex/v1/business_glossary_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # BusinessGlossaryService provides APIs for managing business glossary - # resources for enterprise customers. - # The resources currently supported in Business Glossary are: - # 1. Glossary - # 2. GlossaryCategory - # 3. GlossaryTerm - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/business_glossary_service/rest" - # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - module BusinessGlossaryService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/business_glossary_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb deleted file mode 100644 index 76a1d9952fb8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb +++ /dev/null @@ -1,1863 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/business_glossary_pb" -require "google/cloud/dataplex/v1/business_glossary_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module BusinessGlossaryService - module Rest - ## - # REST client for the BusinessGlossaryService service. - # - # BusinessGlossaryService provides APIs for managing business glossary - # resources for enterprise customers. - # The resources currently supported in Business Glossary are: - # 1. Glossary - # 2. GlossaryCategory - # 3. GlossaryTerm - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :business_glossary_service_stub - - ## - # Configure the BusinessGlossaryService Client class. - # - # See {::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BusinessGlossaryService clients - # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BusinessGlossaryService 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::BusinessGlossaryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @business_glossary_service_stub.universe_domain - end - - ## - # Create a new BusinessGlossaryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BusinessGlossaryService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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 - - @business_glossary_service_stub = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @business_glossary_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @business_glossary_service_stub.endpoint - config.universe_domain = @business_glossary_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @business_glossary_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 = @business_glossary_service_stub.endpoint - config.universe_domain = @business_glossary_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @business_glossary_service_stub.logger - end - - # Service calls - - ## - # Creates a new Glossary resource. - # - # @overload create_glossary(request, options = nil) - # Pass arguments to `create_glossary` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary(parent: nil, glossary_id: nil, glossary: nil, validate_only: nil) - # Pass arguments to `create_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Glossary will be created. - # Format: projects/\\{project_id_or_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param glossary_id [::String] - # Required. Glossary ID: Glossary identifier. - # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash] - # Required. The Glossary to create. - # @param validate_only [::Boolean] - # Optional. Validates the request without actually creating the Glossary. - # Default: 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::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new - # - # # Call the create_glossary method. - # result = client.create_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest - - # Converts hash and nil to an 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_glossary.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_glossary.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.create_glossary 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 Glossary resource. - # - # @overload update_glossary(request, options = nil) - # Pass arguments to `update_glossary` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary(glossary: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param glossary [::Google::Cloud::Dataplex::V1::Glossary, ::Hash] - # Required. The Glossary to update. - # The Glossary's `name` field is used to identify the Glossary to update. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @param validate_only [::Boolean] - # Optional. Validates the request without actually updating the Glossary. - # Default: 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::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new - # - # # Call the update_glossary method. - # result = client.update_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest - - # Converts hash and nil to an 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_glossary.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_glossary.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.update_glossary 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 Glossary resource. All the categories and terms within the - # Glossary must be deleted before the Glossary can be deleted. - # - # @overload delete_glossary(request, options = nil) - # Pass arguments to `delete_glossary` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary(name: nil, etag: nil) - # Pass arguments to `delete_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Glossary to delete. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # @param etag [::String] - # Optional. The etag of the Glossary. - # 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. - # @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::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new - # - # # Call the delete_glossary method. - # result = client.delete_glossary request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest - - # Converts hash and nil to an 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_glossary.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_glossary.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.delete_glossary 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 Glossary resource. - # - # @overload get_glossary(request, options = nil) - # Pass arguments to `get_glossary` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetGlossaryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary(name: nil) - # Pass arguments to `get_glossary` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Glossary to retrieve. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Glossary] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Glossary] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetGlossaryRequest.new - # - # # Call the get_glossary method. - # result = client.get_glossary request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Glossary. - # p result - # - def get_glossary request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryRequest - - # Converts hash and nil to an 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_glossary.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_glossary.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_glossary.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.get_glossary 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 Glossary resources in a project and location. - # - # @overload list_glossaries(request, options = nil) - # Pass arguments to `list_glossaries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListGlossariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListGlossariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_glossaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which has this collection of Glossaries. - # Format: projects/\\{project_id_or_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. The maximum number of Glossaries to return. The service may - # return fewer than this value. If unspecified, at most 50 Glossaries 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 `ListGlossaries` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListGlossaries` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. Filter expression that filters Glossaries listed in the response. - # Filters on proto fields of Glossary are supported. - # Examples of using a filter are: - # - `display_name="my-glossary"` - # - `categoryCount=1` - # - `termCount=0` - # @param order_by [::String] - # Optional. Order by expression that orders Glossaries listed in the - # response. Order by fields are: `name` or `create_time` for the result. If - # not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListGlossariesRequest.new - # - # # Call the list_glossaries method. - # result = client.list_glossaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Glossary. - # p item - # end - # - def list_glossaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossariesRequest - - # Converts hash and nil to an 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_glossaries.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_glossaries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_glossaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.list_glossaries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @business_glossary_service_stub, :list_glossaries, "glossaries", 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 - - ## - # Creates a new GlossaryCategory resource. - # - # @overload create_glossary_category(request, options = nil) - # Pass arguments to `create_glossary_category` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_category(parent: nil, category_id: nil, category: nil) - # Pass arguments to `create_glossary_category` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryCategory will be created. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # where `locationId` refers to a Google Cloud region. - # @param category_id [::String] - # Required. GlossaryCategory identifier. - # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash] - # Required. The GlossaryCategory to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new - # - # # Call the create_glossary_category method. - # result = client.create_glossary_category request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. - # p result - # - def create_glossary_category request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest - - # Converts hash and nil to an 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_glossary_category.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_glossary_category.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_glossary_category.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.create_glossary_category 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 - - ## - # Updates a GlossaryCategory resource. - # - # @overload update_glossary_category(request, options = nil) - # Pass arguments to `update_glossary_category` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_category(category: nil, update_mask: nil) - # Pass arguments to `update_glossary_category` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param category [::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash] - # Required. The GlossaryCategory to update. - # The GlossaryCategory's `name` field is used to identify the - # GlossaryCategory to update. Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new - # - # # Call the update_glossary_category method. - # result = client.update_glossary_category request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. - # p result - # - def update_glossary_category request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest - - # Converts hash and nil to an 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_glossary_category.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_glossary_category.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_glossary_category.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.update_glossary_category 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 a GlossaryCategory resource. All the GlossaryCategories and - # GlossaryTerms nested directly under the specified GlossaryCategory will be - # moved one level up to the parent in the hierarchy. - # - # @overload delete_glossary_category(request, options = nil) - # Pass arguments to `delete_glossary_category` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_category(name: nil) - # Pass arguments to `delete_glossary_category` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryCategory to delete. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new - # - # # Call the delete_glossary_category method. - # result = client.delete_glossary_category request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_glossary_category request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest - - # Converts hash and nil to an 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_glossary_category.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_glossary_category.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_glossary_category.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.delete_glossary_category 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 a GlossaryCategory resource. - # - # @overload get_glossary_category(request, options = nil) - # Pass arguments to `get_glossary_category` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_category(name: nil) - # Pass arguments to `get_glossary_category` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryCategory to retrieve. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new - # - # # Call the get_glossary_category method. - # result = client.get_glossary_category request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. - # p result - # - def get_glossary_category request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest - - # Converts hash and nil to an 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_glossary_category.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_glossary_category.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_glossary_category.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.get_glossary_category 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 GlossaryCategory resources in a Glossary. - # - # @overload list_glossary_categories(request, options = nil) - # Pass arguments to `list_glossary_categories` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_categories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_glossary_categories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which has this collection of GlossaryCategories. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # Location is the Google Cloud region. - # @param page_size [::Integer] - # Optional. The maximum number of GlossaryCategories to return. The service - # may return fewer than this value. If unspecified, at most 50 - # GlossaryCategories 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 `ListGlossaryCategories` - # call. Provide this to retrieve the subsequent page. When paginating, all - # other parameters provided to `ListGlossaryCategories` must match the call - # that provided the page token. - # @param filter [::String] - # Optional. Filter expression that filters GlossaryCategories listed in the - # response. Filters are supported on the following fields: - # - immediate_parent - # - # Examples of using a filter are: - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` - # - # This will only return the GlossaryCategories that are directly nested - # under the specified parent. - # @param order_by [::String] - # Optional. Order by expression that orders GlossaryCategories listed in the - # response. Order by fields are: `name` or `create_time` for the result. If - # not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.new - # - # # Call the list_glossary_categories method. - # result = client.list_glossary_categories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryCategory. - # p item - # end - # - def list_glossary_categories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest - - # Converts hash and nil to an 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_glossary_categories.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_glossary_categories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_glossary_categories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.list_glossary_categories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_categories, "categories", 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 - - ## - # Creates a new GlossaryTerm resource. - # - # @overload create_glossary_term(request, options = nil) - # Pass arguments to `create_glossary_term` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_term(parent: nil, term_id: nil, term: nil) - # Pass arguments to `create_glossary_term` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 the GlossaryTerm will be created. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # where `location_id` refers to a Google Cloud region. - # @param term_id [::String] - # Required. GlossaryTerm identifier. - # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash] - # Required. The GlossaryTerm to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new - # - # # Call the create_glossary_term method. - # result = client.create_glossary_term request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. - # p result - # - def create_glossary_term request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest - - # Converts hash and nil to an 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_glossary_term.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_glossary_term.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_glossary_term.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.create_glossary_term 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 - - ## - # Updates a GlossaryTerm resource. - # - # @overload update_glossary_term(request, options = nil) - # Pass arguments to `update_glossary_term` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_term(term: nil, update_mask: nil) - # Pass arguments to `update_glossary_term` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param term [::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash] - # Required. The GlossaryTerm to update. - # The GlossaryTerm's `name` field is used to identify the GlossaryTerm to - # update. Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new - # - # # Call the update_glossary_term method. - # result = client.update_glossary_term request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. - # p result - # - def update_glossary_term request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest - - # Converts hash and nil to an 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_glossary_term.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_glossary_term.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_glossary_term.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.update_glossary_term 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 a GlossaryTerm resource. - # - # @overload delete_glossary_term(request, options = nil) - # Pass arguments to `delete_glossary_term` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_term(name: nil) - # Pass arguments to `delete_glossary_term` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryTerm to delete. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new - # - # # Call the delete_glossary_term method. - # result = client.delete_glossary_term request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_glossary_term request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest - - # Converts hash and nil to an 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_glossary_term.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_glossary_term.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_glossary_term.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.delete_glossary_term 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 a GlossaryTerm resource. - # - # @overload get_glossary_term(request, options = nil) - # Pass arguments to `get_glossary_term` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_term(name: nil) - # Pass arguments to `get_glossary_term` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GlossaryTerm to retrieve. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new - # - # # Call the get_glossary_term method. - # result = client.get_glossary_term request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. - # p result - # - def get_glossary_term request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest - - # Converts hash and nil to an 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_glossary_term.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_glossary_term.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_glossary_term.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.get_glossary_term 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 GlossaryTerm resources in a Glossary. - # - # @overload list_glossary_terms(request, options = nil) - # Pass arguments to `list_glossary_terms` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_glossary_terms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_glossary_terms` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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, which has this collection of GlossaryTerms. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. The maximum number of GlossaryTerms to return. The service may - # return fewer than this value. If unspecified, at most 50 GlossaryTerms 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 `ListGlossaryTerms` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListGlossaryTerms` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. Filter expression that filters GlossaryTerms listed in the - # response. Filters are supported on the following fields: - # - immediate_parent - # - # Examples of using a filter are: - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` - # - # This will only return the GlossaryTerms that are directly nested under the - # specified parent. - # @param order_by [::String] - # Optional. Order by expression that orders GlossaryTerms listed in the - # response. Order by fields are: `name` or `create_time` for the result. If - # not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.new - # - # # Call the list_glossary_terms method. - # result = client.list_glossary_terms request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryTerm. - # p item - # end - # - def list_glossary_terms request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest - - # Converts hash and nil to an 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_glossary_terms.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_glossary_terms.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_glossary_terms.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @business_glossary_service_stub.list_glossary_terms request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_terms, "terms", 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 BusinessGlossaryService REST API. - # - # This class represents the configuration for BusinessGlossaryService 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::BusinessGlossaryService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_glossary to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_glossary.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_glossary.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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - 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 BusinessGlossaryService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary - ## - # RPC-specific configuration for `update_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary - ## - # RPC-specific configuration for `delete_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary - ## - # RPC-specific configuration for `get_glossary` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary - ## - # RPC-specific configuration for `list_glossaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossaries - ## - # RPC-specific configuration for `create_glossary_category` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary_category - ## - # RPC-specific configuration for `update_glossary_category` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary_category - ## - # RPC-specific configuration for `delete_glossary_category` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary_category - ## - # RPC-specific configuration for `get_glossary_category` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary_category - ## - # RPC-specific configuration for `list_glossary_categories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossary_categories - ## - # RPC-specific configuration for `create_glossary_term` - # @return [::Gapic::Config::Method] - # - attr_reader :create_glossary_term - ## - # RPC-specific configuration for `update_glossary_term` - # @return [::Gapic::Config::Method] - # - attr_reader :update_glossary_term - ## - # RPC-specific configuration for `delete_glossary_term` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_glossary_term - ## - # RPC-specific configuration for `get_glossary_term` - # @return [::Gapic::Config::Method] - # - attr_reader :get_glossary_term - ## - # RPC-specific configuration for `list_glossary_terms` - # @return [::Gapic::Config::Method] - # - attr_reader :list_glossary_terms - - # @private - def initialize parent_rpcs = nil - create_glossary_config = parent_rpcs.create_glossary if parent_rpcs.respond_to? :create_glossary - @create_glossary = ::Gapic::Config::Method.new create_glossary_config - update_glossary_config = parent_rpcs.update_glossary if parent_rpcs.respond_to? :update_glossary - @update_glossary = ::Gapic::Config::Method.new update_glossary_config - delete_glossary_config = parent_rpcs.delete_glossary if parent_rpcs.respond_to? :delete_glossary - @delete_glossary = ::Gapic::Config::Method.new delete_glossary_config - get_glossary_config = parent_rpcs.get_glossary if parent_rpcs.respond_to? :get_glossary - @get_glossary = ::Gapic::Config::Method.new get_glossary_config - list_glossaries_config = parent_rpcs.list_glossaries if parent_rpcs.respond_to? :list_glossaries - @list_glossaries = ::Gapic::Config::Method.new list_glossaries_config - create_glossary_category_config = parent_rpcs.create_glossary_category if parent_rpcs.respond_to? :create_glossary_category - @create_glossary_category = ::Gapic::Config::Method.new create_glossary_category_config - update_glossary_category_config = parent_rpcs.update_glossary_category if parent_rpcs.respond_to? :update_glossary_category - @update_glossary_category = ::Gapic::Config::Method.new update_glossary_category_config - delete_glossary_category_config = parent_rpcs.delete_glossary_category if parent_rpcs.respond_to? :delete_glossary_category - @delete_glossary_category = ::Gapic::Config::Method.new delete_glossary_category_config - get_glossary_category_config = parent_rpcs.get_glossary_category if parent_rpcs.respond_to? :get_glossary_category - @get_glossary_category = ::Gapic::Config::Method.new get_glossary_category_config - list_glossary_categories_config = parent_rpcs.list_glossary_categories if parent_rpcs.respond_to? :list_glossary_categories - @list_glossary_categories = ::Gapic::Config::Method.new list_glossary_categories_config - create_glossary_term_config = parent_rpcs.create_glossary_term if parent_rpcs.respond_to? :create_glossary_term - @create_glossary_term = ::Gapic::Config::Method.new create_glossary_term_config - update_glossary_term_config = parent_rpcs.update_glossary_term if parent_rpcs.respond_to? :update_glossary_term - @update_glossary_term = ::Gapic::Config::Method.new update_glossary_term_config - delete_glossary_term_config = parent_rpcs.delete_glossary_term if parent_rpcs.respond_to? :delete_glossary_term - @delete_glossary_term = ::Gapic::Config::Method.new delete_glossary_term_config - get_glossary_term_config = parent_rpcs.get_glossary_term if parent_rpcs.respond_to? :get_glossary_term - @get_glossary_term = ::Gapic::Config::Method.new get_glossary_term_config - list_glossary_terms_config = parent_rpcs.list_glossary_terms if parent_rpcs.respond_to? :list_glossary_terms - @list_glossary_terms = ::Gapic::Config::Method.new list_glossary_terms_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/operations.rb deleted file mode 100644 index e0db8df70a50..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/operations.rb +++ /dev/null @@ -1,954 +0,0 @@ -# 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 BusinessGlossaryService - 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 BusinessGlossaryService 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 BusinessGlossaryService 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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/service_stub.rb deleted file mode 100644 index 2bd5b4eab85f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_service/rest/service_stub.rb +++ /dev/null @@ -1,1002 +0,0 @@ -# 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 "google/cloud/dataplex/v1/business_glossary_pb" - -module Google - module Cloud - module Dataplex - module V1 - module BusinessGlossaryService - module Rest - ## - # REST service stub for the BusinessGlossaryService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_glossary REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_glossary request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary", - 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_glossary REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_glossary request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary", - 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_glossary REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_glossary request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary", - 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_glossary REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Glossary] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Glossary] - # A result object deserialized from the server's reply - def get_glossary request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Glossary.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_glossaries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossariesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::ListGlossariesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListGlossariesResponse] - # A result object deserialized from the server's reply - def list_glossaries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_glossaries_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossaries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListGlossariesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_glossary_category REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GlossaryCategory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # A result object deserialized from the server's reply - def create_glossary_category request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_category_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_category", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.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_glossary_category REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GlossaryCategory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # A result object deserialized from the server's reply - def update_glossary_category request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_category_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_category", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.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_glossary_category REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_glossary_category request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_category_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_category", - 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 get_glossary_category REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GlossaryCategory] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # A result object deserialized from the server's reply - def get_glossary_category request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_category_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_category", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.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_glossary_categories REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::ListGlossaryCategoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse] - # A result object deserialized from the server's reply - def list_glossary_categories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_glossary_categories_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_categories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_glossary_term REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GlossaryTerm] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # A result object deserialized from the server's reply - def create_glossary_term request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_glossary_term_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_term", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.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_glossary_term REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GlossaryTerm] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # A result object deserialized from the server's reply - def update_glossary_term request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_glossary_term_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_term", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.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_glossary_term REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_glossary_term request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_glossary_term_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_term", - 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 get_glossary_term REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GlossaryTerm] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # A result object deserialized from the server's reply - def get_glossary_term request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_glossary_term_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_term", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.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_glossary_terms REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::ListGlossaryTermsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse] - # A result object deserialized from the server's reply - def list_glossary_terms request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_glossary_terms_request request_pb - query_string_params = if query_string_params.any? - query_string_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_glossary_terms", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse.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 create_glossary REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryRequest] - # 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_glossary_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/glossaries", - body: "glossary", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_glossary REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest] - # 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_glossary_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{glossary.name}", - body: "glossary", - matches: [ - ["glossary.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_glossary REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest] - # 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_glossary_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_glossary REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryRequest] - # 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_glossary_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_glossaries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossariesRequest] - # 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_glossaries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/glossaries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_glossary_category REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest] - # 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_glossary_category_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/categories", - body: "category", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_glossary_category REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest] - # 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_glossary_category_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{category.name}", - body: "category", - matches: [ - ["category.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_glossary_category REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest] - # 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_glossary_category_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_glossary_category REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest] - # 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_glossary_category_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_glossary_categories REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest] - # 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_glossary_categories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/categories", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_glossary_term REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest] - # 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_glossary_term_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/terms", - body: "term", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_glossary_term REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest] - # 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_glossary_term_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{term.name}", - body: "term", - matches: [ - ["term.name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_glossary_term REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest] - # 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_glossary_term_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_glossary_term REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest] - # 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_glossary_term_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_glossary_terms REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest] - # 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_glossary_terms_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/terms", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_services_pb.rb deleted file mode 100644 index 4b08e18aed0e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/business_glossary_services_pb.rb +++ /dev/null @@ -1,81 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/business_glossary.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/business_glossary_pb' - -module Google - module Cloud - module Dataplex - module V1 - module BusinessGlossaryService - # BusinessGlossaryService provides APIs for managing business glossary - # resources for enterprise customers. - # The resources currently supported in Business Glossary are: - # 1. Glossary - # 2. GlossaryCategory - # 3. GlossaryTerm - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.BusinessGlossaryService' - - # Creates a new Glossary resource. - rpc :CreateGlossary, ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, ::Google::Longrunning::Operation - # Updates a Glossary resource. - rpc :UpdateGlossary, ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, ::Google::Longrunning::Operation - # Deletes a Glossary resource. All the categories and terms within the - # Glossary must be deleted before the Glossary can be deleted. - rpc :DeleteGlossary, ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, ::Google::Longrunning::Operation - # Gets a Glossary resource. - rpc :GetGlossary, ::Google::Cloud::Dataplex::V1::GetGlossaryRequest, ::Google::Cloud::Dataplex::V1::Glossary - # Lists Glossary resources in a project and location. - rpc :ListGlossaries, ::Google::Cloud::Dataplex::V1::ListGlossariesRequest, ::Google::Cloud::Dataplex::V1::ListGlossariesResponse - # Creates a new GlossaryCategory resource. - rpc :CreateGlossaryCategory, ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, ::Google::Cloud::Dataplex::V1::GlossaryCategory - # Updates a GlossaryCategory resource. - rpc :UpdateGlossaryCategory, ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, ::Google::Cloud::Dataplex::V1::GlossaryCategory - # Deletes a GlossaryCategory resource. All the GlossaryCategories and - # GlossaryTerms nested directly under the specified GlossaryCategory will be - # moved one level up to the parent in the hierarchy. - rpc :DeleteGlossaryCategory, ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, ::Google::Protobuf::Empty - # Gets a GlossaryCategory resource. - rpc :GetGlossaryCategory, ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, ::Google::Cloud::Dataplex::V1::GlossaryCategory - # Lists GlossaryCategory resources in a Glossary. - rpc :ListGlossaryCategories, ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse - # Creates a new GlossaryTerm resource. - rpc :CreateGlossaryTerm, ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, ::Google::Cloud::Dataplex::V1::GlossaryTerm - # Updates a GlossaryTerm resource. - rpc :UpdateGlossaryTerm, ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, ::Google::Cloud::Dataplex::V1::GlossaryTerm - # Deletes a GlossaryTerm resource. - rpc :DeleteGlossaryTerm, ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, ::Google::Protobuf::Empty - # Gets a GlossaryTerm resource. - rpc :GetGlossaryTerm, ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, ::Google::Cloud::Dataplex::V1::GlossaryTerm - # Lists GlossaryTerm resources in a Glossary. - rpc :ListGlossaryTerms, ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, ::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb deleted file mode 100644 index 558348780ca9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_pb.rb +++ /dev/null @@ -1,119 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/catalog.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/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/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/catalog.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\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\"\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 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an EntryType. - # - # @overload update_entry_type(request, options = nil) - # Pass arguments to `update_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. 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::UpdateEntryTypeRequest.new - # - # # Call the update_entry_type method. - # result = client.update_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entry_type.metadata.to_h - - # Set x-goog-api-client, 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_type&.name - header_params["entry_type.name"] = request.entry_type.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entry_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_entry_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an EntryType. - # - # @overload delete_entry_type(request, options = nil) - # Pass arguments to `delete_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entry_type(name: nil, etag: nil) - # Pass arguments to `delete_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryTypeRequest method returns an ABORTED error response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new - # - # # Call the delete_entry_type method. - # result = client.delete_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entry_type.metadata.to_h - - # Set x-goog-api-client, 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_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_entry_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryType resources in a project and location. - # - # @overload list_entry_types(request, options = nil) - # Pass arguments to `list_entry_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the EntryType location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of EntryTypes to return. The service may return - # fewer than this value. If unspecified, the service returns at most 10 - # EntryTypes. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListEntryTypes` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters you provided to `ListEntryTypes` must match the call that - # provided the page token. - # @param filter [::String] - # Optional. Filter request. Filters are case-sensitive. - # The service supports the following formats: - # - # * labels.key1 = "value1" - # * labels:key1 - # * name = "value" - # - # These restrictions can be conjoined with AND, OR, and NOT conjunctions. - # @param order_by [::String] - # Optional. Orders the result by `name` or `create_time` fields. - # If not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new - # - # # Call the list_entry_types method. - # result = client.list_entry_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. - # p item - # end - # - def list_entry_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entry_types.metadata.to_h - - # Set x-goog-api-client, 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_entry_types.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entry_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_entry_types, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_types, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an EntryType. - # - # @overload get_entry_type(request, options = nil) - # Pass arguments to `get_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entry_type(name: nil) - # Pass arguments to `get_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new - # - # # Call the get_entry_type method. - # result = client.get_entry_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. - # p result - # - def get_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entry_type.metadata.to_h - - # Set x-goog-api-client, 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_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_entry_type, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an AspectType. - # - # @overload create_aspect_type(request, options = nil) - # Pass arguments to `create_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) - # Pass arguments to `create_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param aspect_type_id [::String] - # Required. AspectType identifier. - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource. - # @param validate_only [::Boolean] - # Optional. 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::CreateAspectTypeRequest.new - # - # # Call the create_aspect_type method. - # result = client.create_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_aspect_type.metadata.to_h - - # Set x-goog-api-client, 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_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_aspect_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an AspectType. - # - # @overload update_aspect_type(request, options = nil) - # Pass arguments to `update_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new - # - # # Call the update_aspect_type method. - # result = client.update_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_aspect_type.metadata.to_h - - # Set x-goog-api-client, 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.aspect_type&.name - header_params["aspect_type.name"] = request.aspect_type.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_aspect_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an AspectType. - # - # @overload delete_aspect_type(request, options = nil) - # Pass arguments to `delete_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_aspect_type(name: nil, etag: nil) - # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteAspectTypeRequest method returns an ABORTED error - # response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new - # - # # Call the delete_aspect_type method. - # result = client.delete_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_aspect_type.metadata.to_h - - # Set x-goog-api-client, 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_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_aspect_type, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists AspectType resources in a project and location. - # - # @overload list_aspect_types(request, options = nil) - # Pass arguments to `list_aspect_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_aspect_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AspectType location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of AspectTypes to return. The service may return - # fewer than this value. If unspecified, the service returns at most 10 - # AspectTypes. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListAspectTypes` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters you provide to `ListAspectTypes` must match the call that - # provided the page token. - # @param filter [::String] - # Optional. Filter request. Filters are case-sensitive. - # The service supports the following formats: - # - # * labels.key1 = "value1" - # * labels:key1 - # * name = "value" - # - # These restrictions can be conjoined with AND, OR, and NOT conjunctions. - # @param order_by [::String] - # Optional. Orders the result by `name` or `create_time` fields. - # If not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new - # - # # Call the list_aspect_types method. - # result = client.list_aspect_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. - # p item - # end - # - def list_aspect_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_aspect_types.metadata.to_h - - # Set x-goog-api-client, 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_aspect_types.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_aspect_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_aspect_types, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_aspect_types, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an AspectType. - # - # @overload get_aspect_type(request, options = nil) - # Pass arguments to `get_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_aspect_type(name: nil) - # Pass arguments to `get_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::AspectType] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new - # - # # Call the get_aspect_type method. - # result = client.get_aspect_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. - # p result - # - def get_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_aspect_type.metadata.to_h - - # Set x-goog-api-client, 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_aspect_type.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_aspect_type, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an EntryGroup. - # - # @overload create_entry_group(request, options = nil) - # Pass arguments to `create_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) - # Pass arguments to `create_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the entryGroup, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param entry_group_id [::String] - # Required. EntryGroup identifier. - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource. - # @param validate_only [::Boolean] - # Optional. 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::CreateEntryGroupRequest.new - # - # # Call the create_entry_group method. - # result = client.create_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entry_group.metadata.to_h - - # Set x-goog-api-client, 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_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_entry_group, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an EntryGroup. - # - # @overload update_entry_group(request, options = nil) - # Pass arguments to `update_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. 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::UpdateEntryGroupRequest.new - # - # # Call the update_entry_group method. - # result = client.update_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entry_group.metadata.to_h - - # Set x-goog-api-client, 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_group&.name - header_params["entry_group.name"] = request.entry_group.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_entry_group, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an EntryGroup. - # - # @overload delete_entry_group(request, options = nil) - # Pass arguments to `delete_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entry_group(name: nil, etag: nil) - # Pass arguments to `delete_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryGroupRequest method returns an ABORTED error - # response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new - # - # # Call the delete_entry_group method. - # result = client.delete_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entry_group.metadata.to_h - - # Set x-goog-api-client, 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_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_entry_group, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryGroup resources in a project and location. - # - # @overload list_entry_groups(request, options = nil) - # Pass arguments to `list_entry_groups` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the entryGroup location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of EntryGroups to return. The service may return - # fewer than this value. If unspecified, the service returns at most 10 - # EntryGroups. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListEntryGroups` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters you provide to `ListEntryGroups` must match the call that - # provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new - # - # # Call the list_entry_groups method. - # result = client.list_entry_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. - # p item - # end - # - def list_entry_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entry_groups.metadata.to_h - - # Set x-goog-api-client, 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_entry_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entry_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_entry_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entry_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an EntryGroup. - # - # @overload get_entry_group(request, options = nil) - # Pass arguments to `get_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entry_group(name: nil) - # Pass arguments to `get_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::EntryGroup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new - # - # # Call the get_entry_group method. - # result = client.get_entry_group request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. - # p result - # - def get_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entry_group.metadata.to_h - - # Set x-goog-api-client, 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_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_entry_group, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an Entry. - # - # @overload create_entry(request, options = nil) - # Pass arguments to `create_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entry(parent: nil, entry_id: nil, entry: nil) - # Pass arguments to `create_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param entry_id [::String] - # Required. Entry identifier. It has to be unique within an Entry Group. - # - # Entries corresponding to Google Cloud resources use an Entry ID format - # based on [full resource - # names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - # The format is a full resource name of the resource without the - # prefix double slashes in the API service name part of the full resource - # name. This allows retrieval of entries using their associated resource - # name. - # - # For example, if the full resource name of a resource is - # `//library.googleapis.com/shelves/shelf1/books/book2`, - # then the suggested entry_id is - # `library.googleapis.com/shelves/shelf1/books/book2`. - # - # It is also suggested to follow the same convention for entries - # corresponding to resources from providers or systems other than Google - # Cloud. - # - # The maximum size of the field is 4000 characters. - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new - # - # # Call the create_entry method. - # result = client.create_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def create_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entry.metadata.to_h - - # Set x-goog-api-client, 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_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_entry, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an Entry. - # - # @overload update_entry(request, options = nil) - # Pass arguments to `update_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) - # Pass arguments to `update_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Mask of fields to update. To update Aspects, the update_mask must - # contain the value "aspects". - # - # If the update_mask is empty, the service will update all modifiable fields - # present in the request. - # @param allow_missing [::Boolean] - # Optional. If set to true and the entry doesn't exist, the service will - # create it. - # @param delete_missing_aspects [::Boolean] - # Optional. If set to true and the aspect_keys specify aspect ranges, the - # service deletes any existing aspects from that range that weren't provided - # in the request. - # @param aspect_keys [::Array<::String>] - # Optional. The map keys of the Aspects which the service should modify. It - # supports the following syntaxes: - # - # * `` - matches an aspect of the given type and empty - # path. - # * `@path` - matches an aspect of the given type and - # specified path. For example, to attach an aspect to a field that is - # specified by the `schema` aspect, the path should have the format - # `Schema.`. - # * `@*` - matches aspects of the given type for all - # paths. - # * `*@path` - matches aspects of all types on the given path. - # - # The service will not remove existing aspects matching the syntax unless - # `delete_missing_aspects` is set to true. - # - # If this field is left empty, the service treats it as specifying - # exactly those Aspects present in the request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new - # - # # Call the update_entry method. - # result = client.update_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def update_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entry.metadata.to_h - - # Set x-goog-api-client, 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&.name - header_params["entry.name"] = request.entry.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :update_entry, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an Entry. - # - # @overload delete_entry(request, options = nil) - # Pass arguments to `delete_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entry(name: nil) - # Pass arguments to `delete_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new - # - # # Call the delete_entry method. - # result = client.delete_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def delete_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entry.metadata.to_h - - # Set x-goog-api-client, 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.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :delete_entry, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Entries within an EntryGroup. - # - # @overload list_entries(request, options = nil) - # Pass arguments to `list_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param page_size [::Integer] - # Optional. Number of items to return per page. If there are remaining - # results, the service returns a next_page_token. If unspecified, the service - # returns at most 10 Entries. The maximum value is 100; values above 100 will - # be coerced to 100. - # @param page_token [::String] - # Optional. Page token received from a previous `ListEntries` call. Provide - # this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter on the entries to return. Filters are case-sensitive. - # You can filter the request by the following fields: - # - # * entry_type - # * entry_source.display_name - # * parent_entry - # - # The comparison operators are =, !=, <, >, <=, >=. The service compares - # strings according to lexical order. - # - # You can use the logical operators AND, OR, NOT in the filter. - # - # You can use Wildcard "*", but for entry_type and parent_entry you need to - # provide the full project id or number. - # - # You cannot use parent_entry in conjunction with other fields. - # - # Example filter expressions: - # - # * "entry_source.display_name=AnExampleDisplayName" - # * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - # * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - # entry_type=projects/another-project/locations/*" - # * "NOT entry_source.display_name=AnotherExampleDisplayName" - # * "parent_entry=projects/example-project/locations/us/entryGroups/example-entry-group/entries/example-entry" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new - # - # # Call the list_entries method. - # result = client.list_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. - # p item - # end - # - def list_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entries.metadata.to_h - - # Set x-goog-api-client, 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_entries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_entries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_entries, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Entry. - # - # @overload get_entry(request, options = nil) - # Pass arguments to `get_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) - # Pass arguments to `get_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View to control which parts of an entry the service should - # return. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # It only works for CUSTOM view. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. It only works for CUSTOM view. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new - # - # # Call the get_entry method. - # result = client.get_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def get_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entry.metadata.to_h - - # Set x-goog-api-client, 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.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_entry, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Looks up an entry by name using the permission on the source system. - # - # @overload lookup_entry(request, options = nil) - # Pass arguments to `lookup_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) - # Pass arguments to `lookup_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View to control which parts of an entry the service should - # return. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # It only works for CUSTOM view. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. It only works for CUSTOM view. - # @param entry [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new - # - # # Call the lookup_entry method. - # result = client.lookup_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def lookup_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_entry.metadata.to_h - - # Set x-goog-api-client, 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.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :lookup_entry, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for Entries matching the given query and scope. - # - # @overload search_entries(request, options = nil) - # Pass arguments to `search_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil, semantic_search: nil) - # Pass arguments to `search_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/global`. - # @param query [::String] - # Required. The query against which entries in scope should be matched. - # The query syntax is defined in [Search syntax for Dataplex Universal - # Catalog](https://cloud.google.com/dataplex/docs/search-syntax). - # @param page_size [::Integer] - # Optional. Number of results in the search page. If <=0, then defaults - # to 10. Max limit for page_size is 1000. Throws an invalid argument for - # page_size > 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `SearchEntries` call. Provide - # this to retrieve the subsequent page. - # @param order_by [::String] - # Optional. Specifies the ordering of results. - # Supported values are: - # - # * `relevance` - # * `last_modified_timestamp` - # * `last_modified_timestamp asc` - # @param scope [::String] - # Optional. The scope under which the search should be operating. It must - # either be `organizations/` or `projects/`. If it is - # unspecified, it defaults to the organization where the project provided in - # `name` is located. - # @param semantic_search [::Boolean] - # Optional. Specifies whether the search should understand the meaning and - # intent behind the query, rather than just matching keywords. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new - # - # # Call the search_entries method. - # result = client.search_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. - # p item - # end - # - def search_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.search_entries.metadata.to_h - - # Set x-goog-api-client, 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.search_entries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :search_entries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :search_entries, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a metadata job. For example, use a metadata job to import metadata - # from a third-party system into Dataplex Universal Catalog. - # - # @overload create_metadata_job(request, options = nil) - # Pass arguments to `create_metadata_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_job(parent: nil, metadata_job: nil, metadata_job_id: nil, validate_only: nil) - # Pass arguments to `create_metadata_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent location, in the format - # `projects/{project_id_or_number}/locations/{location_id}` - # @param metadata_job [::Google::Cloud::Dataplex::V1::MetadataJob, ::Hash] - # Required. The metadata job resource. - # @param metadata_job_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::CreateMetadataJobRequest.new - # - # # Call the create_metadata_job method. - # result = client.create_metadata_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest - - # Converts hash and nil to 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_job.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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_metadata_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_metadata_job, 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 metadata job. - # - # @overload get_metadata_job(request, options = nil) - # Pass arguments to `get_metadata_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetMetadataJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_metadata_job(name: nil) - # Pass arguments to `get_metadata_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the metadata job, in the format - # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::MetadataJob] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::MetadataJob] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example 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::GetMetadataJobRequest.new - # - # # Call the get_metadata_job method. - # result = client.get_metadata_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataJob. - # p result - # - def get_metadata_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest - - # Converts hash and nil to 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_metadata_job.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_metadata_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_metadata_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :get_metadata_job, 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 metadata jobs. - # - # @overload list_metadata_jobs(request, options = nil) - # Pass arguments to `list_metadata_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_metadata_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_metadata_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent location, in the format - # `projects/{project_id_or_number}/locations/{location_id}` - # @param page_size [::Integer] - # Optional. The maximum number of metadata jobs to return. The service might - # return fewer jobs than this value. If unspecified, at most 10 jobs are - # returned. The maximum value is 1,000. - # @param page_token [::String] - # Optional. The page token received from a previous `ListMetadataJobs` call. - # Provide this token to retrieve the subsequent page of results. When - # paginating, all other parameters that are provided to the - # `ListMetadataJobs` request must match the call that provided the page - # token. - # @param 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::MetadataJob>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::MetadataJob>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example 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::ListMetadataJobsRequest.new - # - # # Call the list_metadata_jobs method. - # result = client.list_metadata_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataJob. - # p item - # end - # - def list_metadata_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest - - # Converts hash and nil to 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_jobs.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_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_metadata_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :list_metadata_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @catalog_service_stub, :list_metadata_jobs, 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 - - ## - # Cancels a metadata job. - # - # If you cancel a metadata import job that is in progress, the changes in the - # job might be partially applied. We recommend that you reset the state of - # the entry groups in your project by running another metadata job that - # reverts the changes from the canceled job. - # - # @overload cancel_metadata_job(request, options = nil) - # Pass arguments to `cancel_metadata_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_metadata_job(name: nil) - # Pass arguments to `cancel_metadata_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job, in the format - # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new - # - # # Call the cancel_metadata_job method. - # result = client.cancel_metadata_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_metadata_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest - - # Converts hash and nil to 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_metadata_job.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_metadata_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_metadata_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :cancel_metadata_job, 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 an Entry Link. - # - # @overload create_entry_link(request, options = nil) - # Pass arguments to `create_entry_link` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entry_link(parent: nil, entry_link_id: nil, entry_link: nil) - # Pass arguments to `create_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 parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @param entry_link_id [::String] - # Required. Entry Link 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 EntryGroup. - # @param entry_link [::Google::Cloud::Dataplex::V1::EntryLink, ::Hash] - # Required. Entry Link resource. - # - # @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::CreateEntryLinkRequest.new - # - # # Call the create_entry_link method. - # result = client.create_entry_link request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. - # p result - # - def create_entry_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entry_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.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_entry_link.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entry_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.call_rpc :create_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 - - ## - # 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 [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. - # - # @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::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 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 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::MetadataFeed] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::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::GetMetadataFeedRequest.new - # - # # Call the get_metadata_feed method. - # result = client.get_metadata_feed request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataFeed. - # p result - # - 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::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.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 \ - 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_metadata_feed.timeout, - metadata: metadata, - 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 :get_metadata_feed, 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 - - ## - # Retrieve a list of MetadataFeeds. - # - # @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::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 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 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 [::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::DeleteMetadataFeedRequest.new - # - # # 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. - # # Here is how 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_metadata_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - 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.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 \ - 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_metadata_feed.timeout, - metadata: metadata, - 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 :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) - end - - ## - # Configuration class for the CatalogService API. - # - # This class represents the configuration for CatalogService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entry_type to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::CatalogService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`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::Cloud::Dataplex::V1::CatalogService::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 CatalogService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_type - ## - # RPC-specific configuration for `update_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_type - ## - # RPC-specific configuration for `delete_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_type - ## - # RPC-specific configuration for `list_entry_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_types - ## - # RPC-specific configuration for `get_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_type - ## - # RPC-specific configuration for `create_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_aspect_type - ## - # RPC-specific configuration for `update_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_aspect_type - ## - # RPC-specific configuration for `delete_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_aspect_type - ## - # RPC-specific configuration for `list_aspect_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aspect_types - ## - # RPC-specific configuration for `get_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_aspect_type - ## - # RPC-specific configuration for `create_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_group - ## - # RPC-specific configuration for `update_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_group - ## - # RPC-specific configuration for `delete_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_group - ## - # RPC-specific configuration for `list_entry_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_groups - ## - # RPC-specific configuration for `get_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_group - ## - # RPC-specific configuration for `create_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry - ## - # RPC-specific configuration for `update_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry - ## - # RPC-specific configuration for `delete_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry - ## - # RPC-specific configuration for `list_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entries - ## - # RPC-specific configuration for `get_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry - ## - # RPC-specific configuration for `lookup_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_entry - ## - # RPC-specific configuration for `search_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :search_entries - ## - # RPC-specific configuration for `create_metadata_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_metadata_job - ## - # RPC-specific configuration for `get_metadata_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_metadata_job - ## - # RPC-specific configuration for `list_metadata_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_metadata_jobs - ## - # RPC-specific configuration for `cancel_metadata_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_metadata_job - ## - # RPC-specific configuration for `create_entry_link` - # @return [::Gapic::Config::Method] - # - 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 - create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type - @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config - update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type - @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config - delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type - @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config - list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types - @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config - get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type - @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config - create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type - @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config - update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type - @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config - delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type - @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config - list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types - @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config - get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type - @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config - create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group - @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config - update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group - @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config - delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group - @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config - list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups - @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config - get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group - @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config - create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry - @create_entry = ::Gapic::Config::Method.new create_entry_config - update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry - @update_entry = ::Gapic::Config::Method.new update_entry_config - delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry - @delete_entry = ::Gapic::Config::Method.new delete_entry_config - list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries - @list_entries = ::Gapic::Config::Method.new list_entries_config - get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry - @get_entry = ::Gapic::Config::Method.new get_entry_config - lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry - @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config - search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries - @search_entries = ::Gapic::Config::Method.new search_entries_config - create_metadata_job_config = parent_rpcs.create_metadata_job if parent_rpcs.respond_to? :create_metadata_job - @create_metadata_job = ::Gapic::Config::Method.new create_metadata_job_config - get_metadata_job_config = parent_rpcs.get_metadata_job if parent_rpcs.respond_to? :get_metadata_job - @get_metadata_job = ::Gapic::Config::Method.new get_metadata_job_config - list_metadata_jobs_config = parent_rpcs.list_metadata_jobs if parent_rpcs.respond_to? :list_metadata_jobs - @list_metadata_jobs = ::Gapic::Config::Method.new list_metadata_jobs_config - cancel_metadata_job_config = parent_rpcs.cancel_metadata_job if parent_rpcs.respond_to? :cancel_metadata_job - @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 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb deleted file mode 100644 index 48938939e922..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/credentials.rb +++ /dev/null @@ -1,50 +0,0 @@ -# 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 "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # Credentials for the CatalogService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "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", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb deleted file mode 100644 index 32cefaa774aa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# 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 CatalogService - # 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 CatalogService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb deleted file mode 100644 index 44cdfad19b95..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +++ /dev/null @@ -1,220 +0,0 @@ -# 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 - module CatalogService - # Path helper methods for the CatalogService API. - module Paths - ## - # Create a fully-qualified AspectType resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/aspectTypes/{aspect_type}` - # - # @param project [String] - # @param location [String] - # @param aspect_type [String] - # - # @return [::String] - def aspect_type_path project:, location:, aspect_type: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/aspectTypes/#{aspect_type}" - end - - ## - # Create a fully-qualified Entry resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}` - # - # @param project [String] - # @param location [String] - # @param entry_group [String] - # @param entry [String] - # - # @return [::String] - def entry_path project:, location:, entry_group:, entry: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "entry_group cannot contain /" if entry_group.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entries/#{entry}" - end - - ## - # Create a fully-qualified EntryGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryGroups/{entry_group}` - # - # @param project [String] - # @param location [String] - # @param entry_group [String] - # - # @return [::String] - def entry_group_path project:, location:, entry_group: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}" - end - - ## - # Create a fully-qualified EntryLink resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entryLinks/{entry_link}` - # - # @param project [String] - # @param location [String] - # @param entry_group [String] - # @param entry_link [String] - # - # @return [::String] - def entry_link_path project:, location:, entry_group:, entry_link: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "entry_group cannot contain /" if entry_group.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryGroups/#{entry_group}/entryLinks/#{entry_link}" - end - - ## - # Create a fully-qualified EntryType resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/entryTypes/{entry_type}` - # - # @param project [String] - # @param location [String] - # @param entry_type [String] - # - # @return [::String] - def entry_type_path project:, location:, entry_type: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/entryTypes/#{entry_type}" - end - - ## - # Create a fully-qualified Glossary resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/glossaries/{glossary}` - # - # @param project [String] - # @param location [String] - # @param glossary [String] - # - # @return [::String] - def glossary_path project:, location:, glossary: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/glossaries/#{glossary}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified 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. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/metadataJobs/{metadata_job}` - # - # @param project [String] - # @param location [String] - # @param metadata_job [String] - # - # @return [::String] - def metadata_job_path project:, location:, metadata_job: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/metadataJobs/#{metadata_job}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb deleted file mode 100644 index 7ec1cd69f367..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/catalog_service/credentials" -require "google/cloud/dataplex/v1/catalog_service/paths" -require "google/cloud/dataplex/v1/catalog_service/rest/operations" -require "google/cloud/dataplex/v1/catalog_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # The primary resources offered by this service are EntryGroups, EntryTypes, - # AspectTypes, Entries and EntryLinks. They collectively let data - # administrators organize, manage, secure, and catalog data located across - # cloud projects in their organization in a variety of storage systems, - # including Cloud Storage and BigQuery. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/catalog_service/rest" - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - module CatalogService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/catalog_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb deleted file mode 100644 index c10df4a18cdf..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +++ /dev/null @@ -1,4182 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/catalog_pb" -require "google/cloud/dataplex/v1/catalog_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - module Rest - ## - # REST client for the CatalogService service. - # - # The primary resources offered by this service are EntryGroups, EntryTypes, - # AspectTypes, Entries and EntryLinks. They collectively let data - # administrators organize, manage, secure, and catalog data located across - # cloud projects in their organization in a variety of storage systems, - # including Cloud Storage and BigQuery. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :catalog_service_stub - - ## - # Configure the CatalogService Client class. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CatalogService clients - # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_entry_type.timeout = 60.0 - - default_config.rpcs.update_entry_type.timeout = 60.0 - - default_config.rpcs.delete_entry_type.timeout = 60.0 - - default_config.rpcs.list_entry_types.timeout = 60.0 - default_config.rpcs.list_entry_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_type.timeout = 60.0 - default_config.rpcs.get_entry_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_aspect_type.timeout = 60.0 - - default_config.rpcs.update_aspect_type.timeout = 60.0 - - default_config.rpcs.delete_aspect_type.timeout = 60.0 - - default_config.rpcs.list_aspect_types.timeout = 60.0 - default_config.rpcs.list_aspect_types.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_aspect_type.timeout = 60.0 - default_config.rpcs.get_aspect_type.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry_group.timeout = 60.0 - - default_config.rpcs.update_entry_group.timeout = 60.0 - - default_config.rpcs.delete_entry_group.timeout = 60.0 - - default_config.rpcs.list_entry_groups.timeout = 60.0 - default_config.rpcs.list_entry_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry_group.timeout = 60.0 - default_config.rpcs.get_entry_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.create_entry.timeout = 60.0 - - default_config.rpcs.update_entry.timeout = 60.0 - default_config.rpcs.update_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.delete_entry.timeout = 60.0 - - default_config.rpcs.list_entries.timeout = 20.0 - default_config.rpcs.list_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_entry.timeout = 20.0 - default_config.rpcs.get_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.lookup_entry.timeout = 20.0 - default_config.rpcs.lookup_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.search_entries.timeout = 60.0 - default_config.rpcs.search_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @catalog_service_stub.universe_domain - end - - ## - # Create a new CatalogService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CatalogService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @catalog_service_stub = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @catalog_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @catalog_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 = @catalog_service_stub.endpoint - config.universe_domain = @catalog_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @catalog_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::CatalogService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @catalog_service_stub.logger - end - - # Service calls - - ## - # Creates an EntryType. - # - # @overload create_entry_type(request, options = nil) - # Pass arguments to `create_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry_type(parent: nil, entry_type_id: nil, entry_type: nil, validate_only: nil) - # Pass arguments to `create_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param entry_type_id [::String] - # Required. EntryType identifier. - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource. - # @param validate_only [::Boolean] - # Optional. 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::CreateEntryTypeRequest.new - # - # # Call the create_entry_type method. - # result = client.create_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry_type.metadata.to_h - - # Set x-goog-api-client, 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_entry_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_entry_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an EntryType. - # - # @overload update_entry_type(request, options = nil) - # Pass arguments to `update_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entry_type(entry_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_type [::Google::Cloud::Dataplex::V1::EntryType, ::Hash] - # Required. EntryType Resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. 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::UpdateEntryTypeRequest.new - # - # # Call the update_entry_type method. - # result = client.update_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entry_type.metadata.to_h - - # Set x-goog-api-client, 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_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_entry_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an EntryType. - # - # @overload delete_entry_type(request, options = nil) - # Pass arguments to `delete_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entry_type(name: nil, etag: nil) - # Pass arguments to `delete_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryTypeRequest method returns an ABORTED error response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new - # - # # Call the delete_entry_type method. - # result = client.delete_entry_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entry_type.metadata.to_h - - # Set x-goog-api-client, 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_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_entry_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryType resources in a project and location. - # - # @overload list_entry_types(request, options = nil) - # Pass arguments to `list_entry_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entry_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the EntryType location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of EntryTypes to return. The service may return - # fewer than this value. If unspecified, the service returns at most 10 - # EntryTypes. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListEntryTypes` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters you provided to `ListEntryTypes` must match the call that - # provided the page token. - # @param filter [::String] - # Optional. Filter request. Filters are case-sensitive. - # The service supports the following formats: - # - # * labels.key1 = "value1" - # * labels:key1 - # * name = "value" - # - # These restrictions can be conjoined with AND, OR, and NOT conjunctions. - # @param order_by [::String] - # Optional. Orders the result by `name` or `create_time` fields. - # 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::EntryType>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryType>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new - # - # # Call the list_entry_types method. - # result = client.list_entry_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. - # p item - # end - # - def list_entry_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entry_types.metadata.to_h - - # Set x-goog-api-client, 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_entry_types.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entry_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_entry_types request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entry_types, "entry_types", 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 an EntryType. - # - # @overload get_entry_type(request, options = nil) - # Pass arguments to `get_entry_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entry_type(name: nil) - # Pass arguments to `get_entry_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new - # - # # Call the get_entry_type method. - # result = client.get_entry_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. - # p result - # - def get_entry_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entry_type.metadata.to_h - - # Set x-goog-api-client, 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_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entry_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_entry_type request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an AspectType. - # - # @overload create_aspect_type(request, options = nil) - # Pass arguments to `create_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_aspect_type(parent: nil, aspect_type_id: nil, aspect_type: nil, validate_only: nil) - # Pass arguments to `create_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param aspect_type_id [::String] - # Required. AspectType identifier. - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource. - # @param validate_only [::Boolean] - # Optional. 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::CreateAspectTypeRequest.new - # - # # Call the create_aspect_type method. - # result = client.create_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_aspect_type.metadata.to_h - - # Set x-goog-api-client, 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_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_aspect_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an AspectType. - # - # @overload update_aspect_type(request, options = nil) - # Pass arguments to `update_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_aspect_type(aspect_type: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param aspect_type [::Google::Cloud::Dataplex::V1::AspectType, ::Hash] - # Required. AspectType Resource - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new - # - # # Call the update_aspect_type method. - # result = client.update_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_aspect_type.metadata.to_h - - # Set x-goog-api-client, 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_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_aspect_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an AspectType. - # - # @overload delete_aspect_type(request, options = nil) - # Pass arguments to `delete_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_aspect_type(name: nil, etag: nil) - # Pass arguments to `delete_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteAspectTypeRequest method returns an ABORTED error - # response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new - # - # # Call the delete_aspect_type method. - # result = client.delete_aspect_type request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_aspect_type.metadata.to_h - - # Set x-goog-api-client, 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_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_aspect_type request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists AspectType resources in a project and location. - # - # @overload list_aspect_types(request, options = nil) - # Pass arguments to `list_aspect_types` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAspectTypesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_aspect_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_aspect_types` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the AspectType location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of AspectTypes to return. The service may return - # fewer than this value. If unspecified, the service returns at most 10 - # AspectTypes. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListAspectTypes` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters you provide to `ListAspectTypes` must match the call that - # provided the page token. - # @param filter [::String] - # Optional. Filter request. Filters are case-sensitive. - # The service supports the following formats: - # - # * labels.key1 = "value1" - # * labels:key1 - # * name = "value" - # - # These restrictions can be conjoined with AND, OR, and NOT conjunctions. - # @param order_by [::String] - # Optional. Orders the result by `name` or `create_time` fields. - # 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::AspectType>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::AspectType>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new - # - # # Call the list_aspect_types method. - # result = client.list_aspect_types request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. - # p item - # end - # - def list_aspect_types request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_aspect_types.metadata.to_h - - # Set x-goog-api-client, 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_aspect_types.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_aspect_types.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_aspect_types request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_aspect_types, "aspect_types", 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 an AspectType. - # - # @overload get_aspect_type(request, options = nil) - # Pass arguments to `get_aspect_type` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAspectTypeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_aspect_type(name: nil) - # Pass arguments to `get_aspect_type` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new - # - # # Call the get_aspect_type method. - # result = client.get_aspect_type request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. - # p result - # - def get_aspect_type request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_aspect_type.metadata.to_h - - # Set x-goog-api-client, 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_aspect_type.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_aspect_type.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_aspect_type request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an EntryGroup. - # - # @overload create_entry_group(request, options = nil) - # Pass arguments to `create_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil, validate_only: nil) - # Pass arguments to `create_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the entryGroup, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param entry_group_id [::String] - # Required. EntryGroup identifier. - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource. - # @param validate_only [::Boolean] - # Optional. 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::CreateEntryGroupRequest.new - # - # # Call the create_entry_group method. - # result = client.create_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry_group.metadata.to_h - - # Set x-goog-api-client, 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_entry_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_entry_group request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an EntryGroup. - # - # @overload update_entry_group(request, options = nil) - # Pass arguments to `update_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entry_group(entry_group: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry_group [::Google::Cloud::Dataplex::V1::EntryGroup, ::Hash] - # Required. EntryGroup Resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param validate_only [::Boolean] - # Optional. 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::UpdateEntryGroupRequest.new - # - # # Call the update_entry_group method. - # result = client.update_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entry_group.metadata.to_h - - # Set x-goog-api-client, 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_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_entry_group request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an EntryGroup. - # - # @overload delete_entry_group(request, options = nil) - # Pass arguments to `delete_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entry_group(name: nil, etag: nil) - # Pass arguments to `delete_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryGroupRequest method returns an ABORTED error - # response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new - # - # # Call the delete_entry_group method. - # result = client.delete_entry_group request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entry_group.metadata.to_h - - # Set x-goog-api-client, 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_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_entry_group request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists EntryGroup resources in a project and location. - # - # @overload list_entry_groups(request, options = nil) - # Pass arguments to `list_entry_groups` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entry_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_entry_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the entryGroup location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of EntryGroups to return. The service may return - # fewer than this value. If unspecified, the service returns at most 10 - # EntryGroups. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListEntryGroups` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters you provide to `ListEntryGroups` must match the call that - # provided the page token. - # @param 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::EntryGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::EntryGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new - # - # # Call the list_entry_groups method. - # result = client.list_entry_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. - # p item - # end - # - def list_entry_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entry_groups.metadata.to_h - - # Set x-goog-api-client, 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_entry_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entry_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_entry_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entry_groups, "entry_groups", 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 an EntryGroup. - # - # @overload get_entry_group(request, options = nil) - # Pass arguments to `get_entry_group` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entry_group(name: nil) - # Pass arguments to `get_entry_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new - # - # # Call the get_entry_group method. - # result = client.get_entry_group request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. - # p result - # - def get_entry_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entry_group.metadata.to_h - - # Set x-goog-api-client, 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_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entry_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_entry_group request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an Entry. - # - # @overload create_entry(request, options = nil) - # Pass arguments to `create_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry(parent: nil, entry_id: nil, entry: nil) - # Pass arguments to `create_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param entry_id [::String] - # Required. Entry identifier. It has to be unique within an Entry Group. - # - # Entries corresponding to Google Cloud resources use an Entry ID format - # based on [full resource - # names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - # The format is a full resource name of the resource without the - # prefix double slashes in the API service name part of the full resource - # name. This allows retrieval of entries using their associated resource - # name. - # - # For example, if the full resource name of a resource is - # `//library.googleapis.com/shelves/shelf1/books/book2`, - # then the suggested entry_id is - # `library.googleapis.com/shelves/shelf1/books/book2`. - # - # It is also suggested to follow the same convention for entries - # corresponding to resources from providers or systems other than Google - # Cloud. - # - # The maximum size of the field is 4000 characters. - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new - # - # # Call the create_entry method. - # result = client.create_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def create_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry.metadata.to_h - - # Set x-goog-api-client, 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_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_entry request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an Entry. - # - # @overload update_entry(request, options = nil) - # Pass arguments to `update_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entry(entry: nil, update_mask: nil, allow_missing: nil, delete_missing_aspects: nil, aspect_keys: nil) - # Pass arguments to `update_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entry [::Google::Cloud::Dataplex::V1::Entry, ::Hash] - # Required. Entry resource. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Mask of fields to update. To update Aspects, the update_mask must - # contain the value "aspects". - # - # If the update_mask is empty, the service will update all modifiable fields - # present in the request. - # @param allow_missing [::Boolean] - # Optional. If set to true and the entry doesn't exist, the service will - # create it. - # @param delete_missing_aspects [::Boolean] - # Optional. If set to true and the aspect_keys specify aspect ranges, the - # service deletes any existing aspects from that range that weren't provided - # in the request. - # @param aspect_keys [::Array<::String>] - # Optional. The map keys of the Aspects which the service should modify. It - # supports the following syntaxes: - # - # * `` - matches an aspect of the given type and empty - # path. - # * `@path` - matches an aspect of the given type and - # specified path. For example, to attach an aspect to a field that is - # specified by the `schema` aspect, the path should have the format - # `Schema.`. - # * `@*` - matches aspects of the given type for all - # paths. - # * `*@path` - matches aspects of all types on the given path. - # - # The service will not remove existing aspects matching the syntax unless - # `delete_missing_aspects` is set to true. - # - # If this field is left empty, the service treats it as specifying - # exactly those Aspects present in the request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new - # - # # Call the update_entry method. - # result = client.update_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def update_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entry.metadata.to_h - - # Set x-goog-api-client, 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.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.update_entry request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an Entry. - # - # @overload delete_entry(request, options = nil) - # Pass arguments to `delete_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entry(name: nil) - # Pass arguments to `delete_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new - # - # # Call the delete_entry method. - # result = client.delete_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def delete_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entry.metadata.to_h - - # Set x-goog-api-client, 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.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.delete_entry request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Entries within an EntryGroup. - # - # @overload list_entries(request, options = nil) - # Pass arguments to `list_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entries(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @param page_size [::Integer] - # Optional. Number of items to return per page. If there are remaining - # results, the service returns a next_page_token. If unspecified, the service - # returns at most 10 Entries. The maximum value is 100; values above 100 will - # be coerced to 100. - # @param page_token [::String] - # Optional. Page token received from a previous `ListEntries` call. Provide - # this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter on the entries to return. Filters are case-sensitive. - # You can filter the request by the following fields: - # - # * entry_type - # * entry_source.display_name - # * parent_entry - # - # The comparison operators are =, !=, <, >, <=, >=. The service compares - # strings according to lexical order. - # - # You can use the logical operators AND, OR, NOT in the filter. - # - # You can use Wildcard "*", but for entry_type and parent_entry you need to - # provide the full project id or number. - # - # You cannot use parent_entry in conjunction with other fields. - # - # Example filter expressions: - # - # * "entry_source.display_name=AnExampleDisplayName" - # * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - # * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - # entry_type=projects/another-project/locations/*" - # * "NOT entry_source.display_name=AnotherExampleDisplayName" - # * "parent_entry=projects/example-project/locations/us/entryGroups/example-entry-group/entries/example-entry" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entry>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new - # - # # Call the list_entries method. - # result = client.list_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. - # p item - # end - # - def list_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entries.metadata.to_h - - # Set x-goog-api-client, 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_entries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_entries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_entries, "entries", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Entry. - # - # @overload get_entry(request, options = nil) - # Pass arguments to `get_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entry(name: nil, view: nil, aspect_types: nil, paths: nil) - # Pass arguments to `get_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View to control which parts of an entry the service should - # return. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # It only works for CUSTOM view. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. It only works for CUSTOM view. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntryRequest.new - # - # # Call the get_entry method. - # result = client.get_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def get_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entry.metadata.to_h - - # Set x-goog-api-client, 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.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_entry request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Looks up an entry by name using the permission on the source system. - # - # @overload lookup_entry(request, options = nil) - # Pass arguments to `lookup_entry` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::LookupEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_entry(name: nil, view: nil, aspect_types: nil, paths: nil, entry: nil) - # Pass arguments to `lookup_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/{location}`. - # @param view [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View to control which parts of an entry the service should - # return. - # @param aspect_types [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # It only works for CUSTOM view. - # @param paths [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. It only works for CUSTOM view. - # @param entry [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new - # - # # Call the lookup_entry method. - # result = client.lookup_entry request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - # p result - # - def lookup_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::LookupEntryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_entry.metadata.to_h - - # Set x-goog-api-client, 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.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.lookup_entry request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Searches for Entries matching the given query and scope. - # - # @overload search_entries(request, options = nil) - # Pass arguments to `search_entries` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::SearchEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_entries(name: nil, query: nil, page_size: nil, page_token: nil, order_by: nil, scope: nil, semantic_search: nil) - # Pass arguments to `search_entries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The project to which the request should be attributed in the - # following form: `projects/{project}/locations/global`. - # @param query [::String] - # Required. The query against which entries in scope should be matched. - # The query syntax is defined in [Search syntax for Dataplex Universal - # Catalog](https://cloud.google.com/dataplex/docs/search-syntax). - # @param page_size [::Integer] - # Optional. Number of results in the search page. If <=0, then defaults - # to 10. Max limit for page_size is 1000. Throws an invalid argument for - # page_size > 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `SearchEntries` call. Provide - # this to retrieve the subsequent page. - # @param order_by [::String] - # Optional. Specifies the ordering of results. - # Supported values are: - # - # * `relevance` - # * `last_modified_timestamp` - # * `last_modified_timestamp asc` - # @param scope [::String] - # Optional. The scope under which the search should be operating. It must - # either be `organizations/` or `projects/`. If it is - # unspecified, it defaults to the organization where the project provided in - # `name` is located. - # @param semantic_search [::Boolean] - # Optional. Specifies whether the search should understand the meaning and - # intent behind the query, rather than just matching keywords. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new - # - # # Call the search_entries method. - # result = client.search_entries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. - # p item - # end - # - def search_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::SearchEntriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.search_entries.metadata.to_h - - # Set x-goog-api-client, 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.search_entries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.search_entries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :search_entries, "results", 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 - - ## - # Creates a metadata job. For example, use a metadata job to import metadata - # from a third-party system into Dataplex Universal Catalog. - # - # @overload create_metadata_job(request, options = nil) - # Pass arguments to `create_metadata_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_job(parent: nil, metadata_job: nil, metadata_job_id: nil, validate_only: nil) - # Pass arguments to `create_metadata_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent location, in the format - # `projects/{project_id_or_number}/locations/{location_id}` - # @param metadata_job [::Google::Cloud::Dataplex::V1::MetadataJob, ::Hash] - # Required. The metadata job resource. - # @param metadata_job_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::CreateMetadataJobRequest.new - # - # # Call the create_metadata_job method. - # result = client.create_metadata_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest - - # Converts hash and nil to an 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_job.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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_metadata_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_metadata_job 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 metadata job. - # - # @overload get_metadata_job(request, options = nil) - # Pass arguments to `get_metadata_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetMetadataJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_metadata_job(name: nil) - # Pass arguments to `get_metadata_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the metadata job, in the format - # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::MetadataJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::MetadataJob] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example 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::GetMetadataJobRequest.new - # - # # Call the get_metadata_job method. - # result = client.get_metadata_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataJob. - # p result - # - def get_metadata_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest - - # Converts hash and nil to an 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_metadata_job.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_metadata_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_metadata_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.get_metadata_job 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 metadata jobs. - # - # @overload list_metadata_jobs(request, options = nil) - # Pass arguments to `list_metadata_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_metadata_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_metadata_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent location, in the format - # `projects/{project_id_or_number}/locations/{location_id}` - # @param page_size [::Integer] - # Optional. The maximum number of metadata jobs to return. The service might - # return fewer jobs than this value. If unspecified, at most 10 jobs are - # returned. The maximum value is 1,000. - # @param page_token [::String] - # Optional. The page token received from a previous `ListMetadataJobs` call. - # Provide this token to retrieve the subsequent page of results. When - # paginating, all other parameters that are provided to the - # `ListMetadataJobs` request must match the call that provided the page - # token. - # @param 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::MetadataJob>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::MetadataJob>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example 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::ListMetadataJobsRequest.new - # - # # Call the list_metadata_jobs method. - # result = client.list_metadata_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataJob. - # p item - # end - # - def list_metadata_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest - - # Converts hash and nil to an 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_jobs.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_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_metadata_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.list_metadata_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @catalog_service_stub, :list_metadata_jobs, "metadata_jobs", 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 - - ## - # Cancels a metadata job. - # - # If you cancel a metadata import job that is in progress, the changes in the - # job might be partially applied. We recommend that you reset the state of - # the entry groups in your project by running another metadata job that - # reverts the changes from the canceled job. - # - # @overload cancel_metadata_job(request, options = nil) - # Pass arguments to `cancel_metadata_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_metadata_job(name: nil) - # Pass arguments to `cancel_metadata_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job, in the format - # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new - # - # # Call the cancel_metadata_job method. - # result = client.cancel_metadata_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_metadata_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest - - # Converts hash and nil to an 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_metadata_job.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_metadata_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_metadata_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.cancel_metadata_job 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 an Entry Link. - # - # @overload create_entry_link(request, options = nil) - # Pass arguments to `create_entry_link` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entry_link(parent: nil, entry_link_id: nil, entry_link: nil) - # Pass arguments to `create_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 parent [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @param entry_link_id [::String] - # Required. Entry Link 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 EntryGroup. - # @param entry_link [::Google::Cloud::Dataplex::V1::EntryLink, ::Hash] - # Required. Entry Link resource. - # @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::CreateEntryLinkRequest.new - # - # # Call the create_entry_link method. - # result = client.create_entry_link request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. - # p result - # - def create_entry_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entry_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.create_entry_link.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entry_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @catalog_service_stub.create_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 - - ## - # 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. - # - # @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::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 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 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::MetadataFeed] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::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::GetMetadataFeedRequest.new - # - # # Call the get_metadata_feed method. - # result = client.get_metadata_feed request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::MetadataFeed. - # p result - # - 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::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.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 \ - lib_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_metadata_feed.timeout, - metadata: call_metadata, - 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.get_metadata_feed 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 - - ## - # Retrieve a list of MetadataFeeds. - # - # @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::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 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 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 [::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::DeleteMetadataFeedRequest.new - # - # # 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. - # # Here is how 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_metadata_feed request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - 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.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 \ - lib_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_metadata_feed.timeout, - metadata: call_metadata, - 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.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) - end - - ## - # Configuration class for the CatalogService REST API. - # - # This class represents the configuration for CatalogService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entry_type to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entry_type.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # 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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - 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 CatalogService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_type - ## - # RPC-specific configuration for `update_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_type - ## - # RPC-specific configuration for `delete_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_type - ## - # RPC-specific configuration for `list_entry_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_types - ## - # RPC-specific configuration for `get_entry_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_type - ## - # RPC-specific configuration for `create_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :create_aspect_type - ## - # RPC-specific configuration for `update_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :update_aspect_type - ## - # RPC-specific configuration for `delete_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_aspect_type - ## - # RPC-specific configuration for `list_aspect_types` - # @return [::Gapic::Config::Method] - # - attr_reader :list_aspect_types - ## - # RPC-specific configuration for `get_aspect_type` - # @return [::Gapic::Config::Method] - # - attr_reader :get_aspect_type - ## - # RPC-specific configuration for `create_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry_group - ## - # RPC-specific configuration for `update_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry_group - ## - # RPC-specific configuration for `delete_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry_group - ## - # RPC-specific configuration for `list_entry_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entry_groups - ## - # RPC-specific configuration for `get_entry_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry_group - ## - # RPC-specific configuration for `create_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entry - ## - # RPC-specific configuration for `update_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entry - ## - # RPC-specific configuration for `delete_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entry - ## - # RPC-specific configuration for `list_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entries - ## - # RPC-specific configuration for `get_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entry - ## - # RPC-specific configuration for `lookup_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_entry - ## - # RPC-specific configuration for `search_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :search_entries - ## - # RPC-specific configuration for `create_metadata_job` - # @return [::Gapic::Config::Method] - # - attr_reader :create_metadata_job - ## - # RPC-specific configuration for `get_metadata_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_metadata_job - ## - # RPC-specific configuration for `list_metadata_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_metadata_jobs - ## - # RPC-specific configuration for `cancel_metadata_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_metadata_job - ## - # RPC-specific configuration for `create_entry_link` - # @return [::Gapic::Config::Method] - # - 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 - create_entry_type_config = parent_rpcs.create_entry_type if parent_rpcs.respond_to? :create_entry_type - @create_entry_type = ::Gapic::Config::Method.new create_entry_type_config - update_entry_type_config = parent_rpcs.update_entry_type if parent_rpcs.respond_to? :update_entry_type - @update_entry_type = ::Gapic::Config::Method.new update_entry_type_config - delete_entry_type_config = parent_rpcs.delete_entry_type if parent_rpcs.respond_to? :delete_entry_type - @delete_entry_type = ::Gapic::Config::Method.new delete_entry_type_config - list_entry_types_config = parent_rpcs.list_entry_types if parent_rpcs.respond_to? :list_entry_types - @list_entry_types = ::Gapic::Config::Method.new list_entry_types_config - get_entry_type_config = parent_rpcs.get_entry_type if parent_rpcs.respond_to? :get_entry_type - @get_entry_type = ::Gapic::Config::Method.new get_entry_type_config - create_aspect_type_config = parent_rpcs.create_aspect_type if parent_rpcs.respond_to? :create_aspect_type - @create_aspect_type = ::Gapic::Config::Method.new create_aspect_type_config - update_aspect_type_config = parent_rpcs.update_aspect_type if parent_rpcs.respond_to? :update_aspect_type - @update_aspect_type = ::Gapic::Config::Method.new update_aspect_type_config - delete_aspect_type_config = parent_rpcs.delete_aspect_type if parent_rpcs.respond_to? :delete_aspect_type - @delete_aspect_type = ::Gapic::Config::Method.new delete_aspect_type_config - list_aspect_types_config = parent_rpcs.list_aspect_types if parent_rpcs.respond_to? :list_aspect_types - @list_aspect_types = ::Gapic::Config::Method.new list_aspect_types_config - get_aspect_type_config = parent_rpcs.get_aspect_type if parent_rpcs.respond_to? :get_aspect_type - @get_aspect_type = ::Gapic::Config::Method.new get_aspect_type_config - create_entry_group_config = parent_rpcs.create_entry_group if parent_rpcs.respond_to? :create_entry_group - @create_entry_group = ::Gapic::Config::Method.new create_entry_group_config - update_entry_group_config = parent_rpcs.update_entry_group if parent_rpcs.respond_to? :update_entry_group - @update_entry_group = ::Gapic::Config::Method.new update_entry_group_config - delete_entry_group_config = parent_rpcs.delete_entry_group if parent_rpcs.respond_to? :delete_entry_group - @delete_entry_group = ::Gapic::Config::Method.new delete_entry_group_config - list_entry_groups_config = parent_rpcs.list_entry_groups if parent_rpcs.respond_to? :list_entry_groups - @list_entry_groups = ::Gapic::Config::Method.new list_entry_groups_config - get_entry_group_config = parent_rpcs.get_entry_group if parent_rpcs.respond_to? :get_entry_group - @get_entry_group = ::Gapic::Config::Method.new get_entry_group_config - create_entry_config = parent_rpcs.create_entry if parent_rpcs.respond_to? :create_entry - @create_entry = ::Gapic::Config::Method.new create_entry_config - update_entry_config = parent_rpcs.update_entry if parent_rpcs.respond_to? :update_entry - @update_entry = ::Gapic::Config::Method.new update_entry_config - delete_entry_config = parent_rpcs.delete_entry if parent_rpcs.respond_to? :delete_entry - @delete_entry = ::Gapic::Config::Method.new delete_entry_config - list_entries_config = parent_rpcs.list_entries if parent_rpcs.respond_to? :list_entries - @list_entries = ::Gapic::Config::Method.new list_entries_config - get_entry_config = parent_rpcs.get_entry if parent_rpcs.respond_to? :get_entry - @get_entry = ::Gapic::Config::Method.new get_entry_config - lookup_entry_config = parent_rpcs.lookup_entry if parent_rpcs.respond_to? :lookup_entry - @lookup_entry = ::Gapic::Config::Method.new lookup_entry_config - search_entries_config = parent_rpcs.search_entries if parent_rpcs.respond_to? :search_entries - @search_entries = ::Gapic::Config::Method.new search_entries_config - create_metadata_job_config = parent_rpcs.create_metadata_job if parent_rpcs.respond_to? :create_metadata_job - @create_metadata_job = ::Gapic::Config::Method.new create_metadata_job_config - get_metadata_job_config = parent_rpcs.get_metadata_job if parent_rpcs.respond_to? :get_metadata_job - @get_metadata_job = ::Gapic::Config::Method.new get_metadata_job_config - list_metadata_jobs_config = parent_rpcs.list_metadata_jobs if parent_rpcs.respond_to? :list_metadata_jobs - @list_metadata_jobs = ::Gapic::Config::Method.new list_metadata_jobs_config - cancel_metadata_job_config = parent_rpcs.cancel_metadata_job if parent_rpcs.respond_to? :cancel_metadata_job - @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 - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb deleted file mode 100644 index 5ccbb965a76f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +++ /dev/null @@ -1,954 +0,0 @@ -# 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 CatalogService - 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 CatalogService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CatalogService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb deleted file mode 100644 index 3d56ba952381..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +++ /dev/null @@ -1,2353 +0,0 @@ -# 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 "google/cloud/dataplex/v1/catalog_pb" - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - module Rest - ## - # REST service stub for the CatalogService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_entry_type", - 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_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_entry_type", - 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_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_entry_type", - 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_entry_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryTypesResponse] - # A result object deserialized from the server's reply - def list_entry_types request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_types_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_entry_types", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.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_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # A result object deserialized from the server's reply - def get_entry_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_entry_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::EntryType.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_aspect_type", - 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_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_aspect_type", - 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_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_aspect_type", - 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_aspect_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListAspectTypesResponse] - # A result object deserialized from the server's reply - def list_aspect_types request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_aspect_types_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_aspect_types", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.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_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::AspectType] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # A result object deserialized from the server's reply - def get_aspect_type request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_aspect_type_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_aspect_type", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::AspectType.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_entry_group", - 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_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_entry_group", - 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_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_entry_group", - 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_entry_groups REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse] - # A result object deserialized from the server's reply - def list_entry_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entry_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_entry_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.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_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EntryGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # A result object deserialized from the server's reply - def get_entry_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_entry_group", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::EntryGroup.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def create_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.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_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def update_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.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 REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def delete_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.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_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntriesResponse] - # A result object deserialized from the server's reply - def list_entries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_entries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.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 REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def get_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.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_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entry] - # A result object deserialized from the server's reply - def lookup_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_entry_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "lookup_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entry.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResponse] - # A result object deserialized from the server's reply - def search_entries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_entries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "search_entries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_metadata_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_metadata_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_metadata_job", - 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_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetMetadataJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::MetadataJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::MetadataJob] - # A result object deserialized from the server's reply - def get_metadata_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_metadata_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_metadata_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::MetadataJob.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_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::ListMetadataJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse] - # A result object deserialized from the server's reply - def list_metadata_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_metadata_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_metadata_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse.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_metadata_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_metadata_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_metadata_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_metadata_job", - 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 create_entry_link REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 create_entry_link request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_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: "create_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 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 - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 delete_entry_link request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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: "delete_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 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 - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryLinkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 get_entry_link request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_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: "get_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 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 - # - # GRPC transcoding helper method for the create_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entryTypes", - body: "entry_type", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{entry_type.name}", - body: "entry_type", - matches: [ - ["entry_type.name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entry_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryTypesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entry_types_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entryTypes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entry_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/aspectTypes", - body: "aspect_type", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{aspect_type.name}", - body: "aspect_type", - matches: [ - ["aspect_type.name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_aspect_types REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAspectTypesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_aspect_types_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/aspectTypes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_aspect_type REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAspectTypeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_aspect_type_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/aspectTypes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entryGroups", - body: "entry_group", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{entry_group.name}", - body: "entry_group", - matches: [ - ["entry_group.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entry_groups REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entry_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entryGroups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entry_group REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entries", - body: "entry", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{entry.name}", - body: "entry", - matches: [ - ["entry.name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entries(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_entry REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::LookupEntryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:lookupEntry", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_entries REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::SearchEntriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_entries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:searchEntries", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_metadata_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/metadataJobs", - body: "metadata_job", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_metadata_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetMetadataJobRequest] - # 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_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/metadataJobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_metadata_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest] - # 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_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/metadataJobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_metadata_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest] - # 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_metadata_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/metadataJobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entry_link REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entry_link_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entryLinks", - body: "entry_link", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/?$}, false] - ] - ) - 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 - # - # GRPC transcoding helper method for the delete_entry_link REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entry_link_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entryLinks/[^/]+/?$}, false] - ] - ) - 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 - # - # GRPC transcoding helper method for the get_entry_link REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntryLinkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entry_link_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/entryGroups/[^/]+/entryLinks/[^/]+/?$}, false] - ] - ) - 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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb deleted file mode 100644 index 6503017a33da..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +++ /dev/null @@ -1,127 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/catalog.proto for package 'Google.Cloud.Dataplex.V1' -# Original file comments: -# Copyright 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/catalog_pb' - -module Google - module Cloud - module Dataplex - module V1 - module CatalogService - # The primary resources offered by this service are EntryGroups, EntryTypes, - # AspectTypes, Entries and EntryLinks. They collectively let data - # administrators organize, manage, secure, and catalog data located across - # cloud projects in their organization in a variety of storage systems, - # including Cloud Storage and BigQuery. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.CatalogService' - - # Creates an EntryType. - rpc :CreateEntryType, ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Google::Longrunning::Operation - # Updates an EntryType. - rpc :UpdateEntryType, ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Google::Longrunning::Operation - # Deletes an EntryType. - rpc :DeleteEntryType, ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Google::Longrunning::Operation - # Lists EntryType resources in a project and location. - rpc :ListEntryTypes, ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse - # Gets an EntryType. - rpc :GetEntryType, ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Google::Cloud::Dataplex::V1::EntryType - # Creates an AspectType. - rpc :CreateAspectType, ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Google::Longrunning::Operation - # Updates an AspectType. - rpc :UpdateAspectType, ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Google::Longrunning::Operation - # Deletes an AspectType. - rpc :DeleteAspectType, ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Google::Longrunning::Operation - # Lists AspectType resources in a project and location. - rpc :ListAspectTypes, ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse - # Gets an AspectType. - rpc :GetAspectType, ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Google::Cloud::Dataplex::V1::AspectType - # Creates an EntryGroup. - rpc :CreateEntryGroup, ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Google::Longrunning::Operation - # Updates an EntryGroup. - rpc :UpdateEntryGroup, ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Google::Longrunning::Operation - # Deletes an EntryGroup. - rpc :DeleteEntryGroup, ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Google::Longrunning::Operation - # Lists EntryGroup resources in a project and location. - rpc :ListEntryGroups, ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse - # Gets an EntryGroup. - rpc :GetEntryGroup, ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Google::Cloud::Dataplex::V1::EntryGroup - # Creates an Entry. - rpc :CreateEntry, ::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Updates an Entry. - rpc :UpdateEntry, ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Deletes an Entry. - rpc :DeleteEntry, ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Google::Cloud::Dataplex::V1::Entry - # Lists Entries within an EntryGroup. - rpc :ListEntries, ::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Google::Cloud::Dataplex::V1::ListEntriesResponse - # Gets an Entry. - 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. - 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 - # Creates a metadata job. For example, use a metadata job to import metadata - # from a third-party system into Dataplex Universal Catalog. - rpc :CreateMetadataJob, ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, ::Google::Longrunning::Operation - # Gets a metadata job. - rpc :GetMetadataJob, ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, ::Google::Cloud::Dataplex::V1::MetadataJob - # Lists metadata jobs. - rpc :ListMetadataJobs, ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, ::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse - # Cancels a metadata job. - # - # If you cancel a metadata import job that is in progress, the changes in the - # job might be partially applied. We recommend that you reset the state of - # the entry groups in your project by running another metadata job that - # reverts the changes from the canceled job. - rpc :CancelMetadataJob, ::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 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb deleted file mode 100644 index e565b64a7f22..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/cmek.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/service_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EncryptionConfig").msgclass - EncryptionConfig::FailureDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EncryptionConfig.FailureDetails").msgclass - EncryptionConfig::FailureDetails::ErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EncryptionConfig.FailureDetails.ErrorCode").enummodule - EncryptionConfig::EncryptionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EncryptionConfig.EncryptionState").enummodule - CreateEncryptionConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateEncryptionConfigRequest").msgclass - GetEncryptionConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetEncryptionConfigRequest").msgclass - UpdateEncryptionConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateEncryptionConfigRequest").msgclass - DeleteEncryptionConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteEncryptionConfigRequest").msgclass - ListEncryptionConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEncryptionConfigsRequest").msgclass - ListEncryptionConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListEncryptionConfigsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service.rb deleted file mode 100644 index 11b6c0ce1cbb..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# 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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/cmek_service/credentials" -require "google/cloud/dataplex/v1/cmek_service/paths" -require "google/cloud/dataplex/v1/cmek_service/operations" -require "google/cloud/dataplex/v1/cmek_service/client" -require "google/cloud/dataplex/v1/cmek_service/rest" - -module Google - module Cloud - module Dataplex - module V1 - ## - # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/cmek_service" - # client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/cmek_service/rest" - # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new - # - module CmekService - end - end - end - end -end - -helper_path = ::File.join __dir__, "cmek_service", "helpers.rb" -require "google/cloud/dataplex/v1/cmek_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/client.rb deleted file mode 100644 index cd4673362ec5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/client.rb +++ /dev/null @@ -1,961 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/cmek_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module CmekService - ## - # Client for the CmekService service. - # - # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cmek_service_stub - - ## - # Configure the CmekService Client class. - # - # See {::Google::Cloud::Dataplex::V1::CmekService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CmekService clients - # ::Google::Cloud::Dataplex::V1::CmekService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CmekService 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::CmekService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cmek_service_stub.universe_domain - end - - ## - # Create a new CmekService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CmekService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/cmek_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @cmek_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::CmekService::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, - logger: @config.logger - ) - - @cmek_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @cmek_service_stub.endpoint - config.universe_domain = @cmek_service_stub.universe_domain - config.logger = @cmek_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @cmek_service_stub.endpoint - config.universe_domain = @cmek_service_stub.universe_domain - config.logger = @cmek_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::CmekService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cmek_service_stub.logger - end - - # Service calls - - ## - # Create an EncryptionConfig. - # - # @overload create_encryption_config(request, options = nil) - # Pass arguments to `create_encryption_config` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_config(parent: nil, encryption_config_id: nil, encryption_config: nil) - # Pass arguments to `create_encryption_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The location at which the EncryptionConfig is to be created. - # @param encryption_config_id [::String] - # Required. The ID of the - # {::Google::Cloud::Dataplex::V1::EncryptionConfig EncryptionConfig} to create. - # Currently, only a value of "default" is supported. - # @param encryption_config [::Google::Cloud::Dataplex::V1::EncryptionConfig, ::Hash] - # Required. The EncryptionConfig to create. - # - # @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::CmekService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new - # - # # Call the create_encryption_config method. - # result = client.create_encryption_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_encryption_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest - - # Converts hash and nil to 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_encryption_config.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_encryption_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_encryption_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.call_rpc :create_encryption_config, 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 an EncryptionConfig. - # - # @overload update_encryption_config(request, options = nil) - # Pass arguments to `update_encryption_config` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_config(encryption_config: nil, update_mask: nil) - # Pass arguments to `update_encryption_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param encryption_config [::Google::Cloud::Dataplex::V1::EncryptionConfig, ::Hash] - # Required. The EncryptionConfig to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Mask of fields to update. - # The service treats an omitted field mask as an implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # - # @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::CmekService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new - # - # # Call the update_encryption_config method. - # result = client.update_encryption_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_encryption_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest - - # Converts hash and nil to 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_encryption_config.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.encryption_config&.name - header_params["encryption_config.name"] = request.encryption_config.name - end - - request_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_encryption_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_encryption_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.call_rpc :update_encryption_config, 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 an EncryptionConfig. - # - # @overload delete_encryption_config(request, options = nil) - # Pass arguments to `delete_encryption_config` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_config(name: nil, etag: nil) - # Pass arguments to `delete_encryption_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 EncryptionConfig to delete. - # @param etag [::String] - # Optional. Etag of the EncryptionConfig. This is a strong etag. - # - # @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::CmekService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new - # - # # Call the delete_encryption_config method. - # result = client.delete_encryption_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_encryption_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest - - # Converts hash and nil to 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_encryption_config.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_encryption_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_encryption_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.call_rpc :delete_encryption_config, 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 - - ## - # List EncryptionConfigs. - # - # @overload list_encryption_configs(request, options = nil) - # Pass arguments to `list_encryption_configs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_encryption_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The location for which the EncryptionConfig is to be listed. - # @param page_size [::Integer] - # Optional. Maximum number of EncryptionConfigs to return. The service may - # return fewer than this value. If unspecified, at most 10 EncryptionConfigs - # 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 `ListEncryptionConfigs` call. - # Provide this to retrieve the subsequent page. When paginating, the - # parameters - filter and order_by provided to `ListEncryptionConfigs` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. Filter the EncryptionConfigs to be returned. - # Using bare literals: (These values will be matched anywhere it may appear - # in the object's field values) - # * filter=some_value - # Using fields: (These values will be matched only in the specified field) - # * filter=some_field=some_value - # Supported fields: - # * name, key, create_time, update_time, encryption_state - # Example: - # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config - # conjunctions: (AND, OR, NOT) - # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config - # AND mode=CMEK - # logical operators: (>, <, >=, <=, !=, =, :), - # * filter=create_time>2024-05-01T00:00:00.000Z - # @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::EncryptionConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::EncryptionConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CmekService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.new - # - # # Call the list_encryption_configs method. - # result = client.list_encryption_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EncryptionConfig. - # p item - # end - # - def list_encryption_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest - - # Converts hash and nil to 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_encryption_configs.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_encryption_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_encryption_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.call_rpc :list_encryption_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cmek_service_stub, :list_encryption_configs, 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 an EncryptionConfig. - # - # @overload get_encryption_config(request, options = nil) - # Pass arguments to `get_encryption_config` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_config(name: nil) - # Pass arguments to `get_encryption_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 EncryptionConfig to fetch. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::EncryptionConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CmekService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new - # - # # Call the get_encryption_config method. - # result = client.get_encryption_config request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EncryptionConfig. - # p result - # - def get_encryption_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest - - # Converts hash and nil to 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_encryption_config.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_encryption_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_encryption_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.call_rpc :get_encryption_config, 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 - - ## - # Configuration class for the CmekService API. - # - # This class represents the configuration for CmekService, - # 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::CmekService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_encryption_config to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::CmekService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_encryption_config.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_encryption_config.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::Cloud::Dataplex::V1::CmekService::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 CmekService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_encryption_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_encryption_config - ## - # RPC-specific configuration for `update_encryption_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_encryption_config - ## - # RPC-specific configuration for `delete_encryption_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_encryption_config - ## - # RPC-specific configuration for `list_encryption_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_encryption_configs - ## - # RPC-specific configuration for `get_encryption_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_encryption_config - - # @private - def initialize parent_rpcs = nil - create_encryption_config_config = parent_rpcs.create_encryption_config if parent_rpcs.respond_to? :create_encryption_config - @create_encryption_config = ::Gapic::Config::Method.new create_encryption_config_config - update_encryption_config_config = parent_rpcs.update_encryption_config if parent_rpcs.respond_to? :update_encryption_config - @update_encryption_config = ::Gapic::Config::Method.new update_encryption_config_config - delete_encryption_config_config = parent_rpcs.delete_encryption_config if parent_rpcs.respond_to? :delete_encryption_config - @delete_encryption_config = ::Gapic::Config::Method.new delete_encryption_config_config - list_encryption_configs_config = parent_rpcs.list_encryption_configs if parent_rpcs.respond_to? :list_encryption_configs - @list_encryption_configs = ::Gapic::Config::Method.new list_encryption_configs_config - get_encryption_config_config = parent_rpcs.get_encryption_config if parent_rpcs.respond_to? :get_encryption_config - @get_encryption_config = ::Gapic::Config::Method.new get_encryption_config_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/credentials.rb deleted file mode 100644 index b1430ecaa9b9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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 "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module CmekService - # Credentials for the CmekService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/operations.rb deleted file mode 100644 index c061e274d80b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# 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 CmekService - # 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 CmekService 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 CmekService 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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/paths.rb deleted file mode 100644 index 8cd932842b1f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/paths.rb +++ /dev/null @@ -1,69 +0,0 @@ -# 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 - module CmekService - # Path helper methods for the CmekService API. - module Paths - ## - # Create a fully-qualified EncryptionConfig resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/encryptionConfigs/{encryption_config}` - # - # @param organization [String] - # @param location [String] - # @param encryption_config [String] - # - # @return [::String] - def encryption_config_path organization:, location:, encryption_config: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/encryptionConfigs/#{encryption_config}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest.rb deleted file mode 100644 index 4efa8c9c5af5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/cmek_service/credentials" -require "google/cloud/dataplex/v1/cmek_service/paths" -require "google/cloud/dataplex/v1/cmek_service/rest/operations" -require "google/cloud/dataplex/v1/cmek_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/cmek_service/rest" - # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new - # - module CmekService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/cmek_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb deleted file mode 100644 index 5f8f6b329ef7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/client.rb +++ /dev/null @@ -1,892 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/cmek_pb" -require "google/cloud/dataplex/v1/cmek_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module CmekService - module Rest - ## - # REST client for the CmekService service. - # - # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cmek_service_stub - - ## - # Configure the CmekService Client class. - # - # See {::Google::Cloud::Dataplex::V1::CmekService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CmekService clients - # ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CmekService 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::CmekService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cmek_service_stub.universe_domain - end - - ## - # Create a new CmekService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CmekService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::CmekService::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 - - @cmek_service_stub = ::Google::Cloud::Dataplex::V1::CmekService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cmek_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @cmek_service_stub.endpoint - config.universe_domain = @cmek_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @cmek_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 = @cmek_service_stub.endpoint - config.universe_domain = @cmek_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @cmek_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::CmekService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cmek_service_stub.logger - end - - # Service calls - - ## - # Create an EncryptionConfig. - # - # @overload create_encryption_config(request, options = nil) - # Pass arguments to `create_encryption_config` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_config(parent: nil, encryption_config_id: nil, encryption_config: nil) - # Pass arguments to `create_encryption_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The location at which the EncryptionConfig is to be created. - # @param encryption_config_id [::String] - # Required. The ID of the - # {::Google::Cloud::Dataplex::V1::EncryptionConfig EncryptionConfig} to create. - # Currently, only a value of "default" is supported. - # @param encryption_config [::Google::Cloud::Dataplex::V1::EncryptionConfig, ::Hash] - # Required. The EncryptionConfig to create. - # @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::CmekService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new - # - # # Call the create_encryption_config method. - # result = client.create_encryption_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_encryption_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest - - # Converts hash and nil to an 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_encryption_config.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_encryption_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_encryption_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.create_encryption_config 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 an EncryptionConfig. - # - # @overload update_encryption_config(request, options = nil) - # Pass arguments to `update_encryption_config` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_config(encryption_config: nil, update_mask: nil) - # Pass arguments to `update_encryption_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param encryption_config [::Google::Cloud::Dataplex::V1::EncryptionConfig, ::Hash] - # Required. The EncryptionConfig to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Mask of fields to update. - # The service treats an omitted field mask as an implied field mask - # equivalent to all fields that are populated (have a non-empty value). - # @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::CmekService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new - # - # # Call the update_encryption_config method. - # result = client.update_encryption_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_encryption_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest - - # Converts hash and nil to an 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_encryption_config.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_encryption_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_encryption_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.update_encryption_config 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 an EncryptionConfig. - # - # @overload delete_encryption_config(request, options = nil) - # Pass arguments to `delete_encryption_config` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_config(name: nil, etag: nil) - # Pass arguments to `delete_encryption_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 EncryptionConfig to delete. - # @param etag [::String] - # Optional. Etag of the EncryptionConfig. This is a strong etag. - # @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::CmekService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new - # - # # Call the delete_encryption_config method. - # result = client.delete_encryption_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_encryption_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest - - # Converts hash and nil to an 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_encryption_config.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_encryption_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_encryption_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.delete_encryption_config 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 - - ## - # List EncryptionConfigs. - # - # @overload list_encryption_configs(request, options = nil) - # Pass arguments to `list_encryption_configs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_encryption_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The location for which the EncryptionConfig is to be listed. - # @param page_size [::Integer] - # Optional. Maximum number of EncryptionConfigs to return. The service may - # return fewer than this value. If unspecified, at most 10 EncryptionConfigs - # 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 `ListEncryptionConfigs` call. - # Provide this to retrieve the subsequent page. When paginating, the - # parameters - filter and order_by provided to `ListEncryptionConfigs` must - # match the call that provided the page token. - # @param filter [::String] - # Optional. Filter the EncryptionConfigs to be returned. - # Using bare literals: (These values will be matched anywhere it may appear - # in the object's field values) - # * filter=some_value - # Using fields: (These values will be matched only in the specified field) - # * filter=some_field=some_value - # Supported fields: - # * name, key, create_time, update_time, encryption_state - # Example: - # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config - # conjunctions: (AND, OR, NOT) - # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config - # AND mode=CMEK - # logical operators: (>, <, >=, <=, !=, =, :), - # * filter=create_time>2024-05-01T00:00:00.000Z - # @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::EncryptionConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::EncryptionConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.new - # - # # Call the list_encryption_configs method. - # result = client.list_encryption_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::EncryptionConfig. - # p item - # end - # - def list_encryption_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest - - # Converts hash and nil to an 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_encryption_configs.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_encryption_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_encryption_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.list_encryption_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cmek_service_stub, :list_encryption_configs, "encryption_configs", 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 an EncryptionConfig. - # - # @overload get_encryption_config(request, options = nil) - # Pass arguments to `get_encryption_config` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_encryption_config(name: nil) - # Pass arguments to `get_encryption_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 EncryptionConfig to fetch. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::EncryptionConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new - # - # # Call the get_encryption_config method. - # result = client.get_encryption_config request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::EncryptionConfig. - # p result - # - def get_encryption_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest - - # Converts hash and nil to an 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_encryption_config.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_encryption_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_encryption_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cmek_service_stub.get_encryption_config 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 CmekService REST API. - # - # This class represents the configuration for CmekService 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::CmekService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_encryption_config to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_encryption_config.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_encryption_config.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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - 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 CmekService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_encryption_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_encryption_config - ## - # RPC-specific configuration for `update_encryption_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_encryption_config - ## - # RPC-specific configuration for `delete_encryption_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_encryption_config - ## - # RPC-specific configuration for `list_encryption_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_encryption_configs - ## - # RPC-specific configuration for `get_encryption_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_encryption_config - - # @private - def initialize parent_rpcs = nil - create_encryption_config_config = parent_rpcs.create_encryption_config if parent_rpcs.respond_to? :create_encryption_config - @create_encryption_config = ::Gapic::Config::Method.new create_encryption_config_config - update_encryption_config_config = parent_rpcs.update_encryption_config if parent_rpcs.respond_to? :update_encryption_config - @update_encryption_config = ::Gapic::Config::Method.new update_encryption_config_config - delete_encryption_config_config = parent_rpcs.delete_encryption_config if parent_rpcs.respond_to? :delete_encryption_config - @delete_encryption_config = ::Gapic::Config::Method.new delete_encryption_config_config - list_encryption_configs_config = parent_rpcs.list_encryption_configs if parent_rpcs.respond_to? :list_encryption_configs - @list_encryption_configs = ::Gapic::Config::Method.new list_encryption_configs_config - get_encryption_config_config = parent_rpcs.get_encryption_config if parent_rpcs.respond_to? :get_encryption_config - @get_encryption_config = ::Gapic::Config::Method.new get_encryption_config_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/operations.rb deleted file mode 100644 index 76bfe5b25e8b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/operations.rb +++ /dev/null @@ -1,954 +0,0 @@ -# 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 CmekService - 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 CmekService 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 CmekService 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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/service_stub.rb deleted file mode 100644 index f06595e11b90..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_service/rest/service_stub.rb +++ /dev/null @@ -1,388 +0,0 @@ -# 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 "google/cloud/dataplex/v1/cmek_pb" - -module Google - module Cloud - module Dataplex - module V1 - module CmekService - module Rest - ## - # REST service stub for the CmekService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_encryption_config REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_encryption_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_encryption_config_request request_pb - query_string_params = if query_string_params.any? - query_string_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_encryption_config", - 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_encryption_config REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_encryption_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_encryption_config_request request_pb - query_string_params = if query_string_params.any? - query_string_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_encryption_config", - 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_encryption_config REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_encryption_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_encryption_config_request request_pb - query_string_params = if query_string_params.any? - query_string_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_encryption_config", - 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_encryption_configs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::ListEncryptionConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse] - # A result object deserialized from the server's reply - def list_encryption_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_encryption_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_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_encryption_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse.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_encryption_config REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::EncryptionConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] - # A result object deserialized from the server's reply - def get_encryption_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_encryption_config_request request_pb - query_string_params = if query_string_params.any? - query_string_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_encryption_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::EncryptionConfig.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 create_encryption_config REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest] - # 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_encryption_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/encryptionConfigs", - body: "encryption_config", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_encryption_config REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest] - # 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_encryption_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{encryption_config.name}", - body: "encryption_config", - matches: [ - ["encryption_config.name", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_encryption_config REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest] - # 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_encryption_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_encryption_configs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest] - # 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_encryption_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/encryptionConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_encryption_config REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest] - # 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_encryption_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/encryptionConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_services_pb.rb deleted file mode 100644 index 429355a041cd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/cmek_services_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/cmek.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/cmek_pb' - -module Google - module Cloud - module Dataplex - module V1 - module CmekService - # Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.CmekService' - - # Create an EncryptionConfig. - rpc :CreateEncryptionConfig, ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest, ::Google::Longrunning::Operation - # Update an EncryptionConfig. - rpc :UpdateEncryptionConfig, ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest, ::Google::Longrunning::Operation - # Delete an EncryptionConfig. - rpc :DeleteEncryptionConfig, ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest, ::Google::Longrunning::Operation - # List EncryptionConfigs. - rpc :ListEncryptionConfigs, ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest, ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse - # Get an EncryptionConfig. - rpc :GetEncryptionConfig, ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest, ::Google::Cloud::Dataplex::V1::EncryptionConfig - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb deleted file mode 100644 index 78c3076cb22a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/content.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -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.proto2,\n\x0e\x43ontentService\x1a\x1a\xca\x41\x17\x64\x61taplex.googleapis.comBh\n\x1c\x63om.google.cloud.dataplex.v1B\x0c\x43ontentProtoP\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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb deleted file mode 100644 index ebfc5728819c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service.rb +++ /dev/null @@ -1,49 +0,0 @@ -# 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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/content_service/credentials" -require "google/cloud/dataplex/v1/content_service/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # ContentService manages Notebook and SQL Scripts for Dataplex Universal - # Catalog. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/content_service" - # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new - # - module ContentService - end - end - end - end -end - -helper_path = ::File.join __dir__, "content_service", "helpers.rb" -require "google/cloud/dataplex/v1/content_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb deleted file mode 100644 index 9b0eec675d7d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/client.rb +++ /dev/null @@ -1,395 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/content_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - ## - # Client for the ContentService service. - # - # ContentService manages Notebook and SQL Scripts for Dataplex Universal - # Catalog. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :content_service_stub - - ## - # Configure the ContentService Client class. - # - # See {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ContentService clients - # ::Google::Cloud::Dataplex::V1::ContentService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ContentService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @content_service_stub.universe_domain - end - - ## - # Create a new ContentService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::ContentService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ContentService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/content_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @content_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::ContentService::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, - logger: @config.logger - ) - - @content_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::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.logger = @content_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::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.logger = @content_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @content_service_stub.logger - end - - # Service calls - - ## - # Configuration class for the ContentService API. - # - # This class represents the configuration for ContentService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::ContentService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @!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::Cloud::Dataplex::V1::ContentService::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 ContentService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - # @private - def initialize _parent_rpcs = nil - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb deleted file mode 100644 index cdfe7c3b7aa1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_service/credentials.rb +++ /dev/null @@ -1,44 +0,0 @@ -# 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 "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module ContentService - # Credentials for the ContentService API. - class Credentials < ::Google::Auth::Credentials - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb deleted file mode 100644 index 9af3c1dddcda..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/content_services_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/content.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 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/content_pb' - -module Google - module Cloud - module Dataplex - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb deleted file mode 100644 index 3189565cefed..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_discovery_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_discovery.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n-google/cloud/dataplex/v1/data_discovery.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xcb\x08\n\x11\x44\x61taDiscoverySpec\x12m\n\x1a\x62igquery_publishing_config\x18\x01 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfigB\x03\xe0\x41\x01\x12S\n\x0estorage_config\x18\x64 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfigH\x00\x1a\xee\x02\n\x18\x42igQueryPublishingConfig\x12g\n\ntable_type\x18\x02 \x01(\x0e\x32N.google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableTypeB\x03\xe0\x41\x01\x12H\n\nconnection\x18\x03 \x01(\tB4\xe0\x41\x01\xfa\x41.\n,bigqueryconnection.googleapis.com/Connection\x12\x15\n\x08location\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x07project\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\"B\n\tTableType\x12\x1a\n\x16TABLE_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45XTERNAL\x10\x01\x12\x0b\n\x07\x42IGLAKE\x10\x02\x1a\xed\x03\n\rStorageConfig\x12\x1d\n\x10include_patterns\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12^\n\x0b\x63sv_options\x18\x03 \x01(\x0b\x32\x44.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptionsB\x03\xe0\x41\x01\x12`\n\x0cjson_options\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptionsB\x03\xe0\x41\x01\x1a\x8f\x01\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\x17type_inference_disabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05quote\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1aJ\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12$\n\x17type_inference_disabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\x11\n\x0fresource_config\"\xb7\x04\n\x13\x44\x61taDiscoveryResult\x12\x62\n\x13\x62igquery_publishing\x18\x01 \x01(\x0b\x32@.google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishingB\x03\xe0\x41\x03\x12Z\n\x0fscan_statistics\x18\x02 \x01(\x0b\x32<.google.cloud.dataplex.v1.DataDiscoveryResult.ScanStatisticsB\x03\xe0\x41\x03\x1a\x65\n\x12\x42igQueryPublishing\x12\x38\n\x07\x64\x61taset\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x62igquery.googleapis.com/Dataset\x12\x15\n\x08location\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\xf8\x01\n\x0eScanStatistics\x12\x1a\n\x12scanned_file_count\x18\x01 \x01(\x05\x12\x1c\n\x14\x64\x61ta_processed_bytes\x18\x02 \x01(\x03\x12\x16\n\x0e\x66iles_excluded\x18\x03 \x01(\x05\x12\x16\n\x0etables_created\x18\x04 \x01(\x05\x12\x16\n\x0etables_deleted\x18\x05 \x01(\x05\x12\x16\n\x0etables_updated\x18\x06 \x01(\x05\x12\x18\n\x10\x66ilesets_created\x18\x07 \x01(\x05\x12\x18\n\x10\x66ilesets_deleted\x18\x08 \x01(\x05\x12\x18\n\x10\x66ilesets_updated\x18\t \x01(\x05\x42\xac\x02\n\x1c\x63om.google.cloud.dataplex.v1B\x12\x44\x61taDiscoveryProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb\xea\x41H\n\x1f\x62igquery.googleapis.com/Dataset\x12%projects/{project}/datasets/{dataset}\xea\x41p\n,bigqueryconnection.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - DataDiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec").msgclass - DataDiscoverySpec::BigQueryPublishingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig").msgclass - DataDiscoverySpec::BigQueryPublishingConfig::TableType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.BigQueryPublishingConfig.TableType").enummodule - DataDiscoverySpec::StorageConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig").msgclass - DataDiscoverySpec::StorageConfig::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.CsvOptions").msgclass - DataDiscoverySpec::StorageConfig::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoverySpec.StorageConfig.JsonOptions").msgclass - DataDiscoveryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoveryResult").msgclass - DataDiscoveryResult::BigQueryPublishing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoveryResult.BigQueryPublishing").msgclass - DataDiscoveryResult::ScanStatistics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDiscoveryResult.ScanStatistics").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb deleted file mode 100644 index d845a62b4328..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_documentation_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_documentation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n1google/cloud/dataplex/v1/data_documentation.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"\x93\x02\n\x15\x44\x61taDocumentationSpec\x12\'\n\x1a\x63\x61talog_publishing_enabled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12_\n\x11generation_scopes\x18\x03 \x03(\x0e\x32?.google.cloud.dataplex.v1.DataDocumentationSpec.GenerationScopeB\x03\xe0\x41\x01\"p\n\x0fGenerationScope\x12 \n\x1cGENERATION_SCOPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12!\n\x1dTABLE_AND_COLUMN_DESCRIPTIONS\x10\x02\x12\x0f\n\x0bSQL_QUERIES\x10\x03\"\xe9\x04\n\x17\x44\x61taDocumentationResult\x12Z\n\x0ctable_result\x18\x08 \x01(\x0b\x32=.google.cloud.dataplex.v1.DataDocumentationResult.TableResultB\x03\xe0\x41\x03H\x00\x1a\xd5\x01\n\x0bTableResult\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08overview\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12M\n\x06schema\x18\x03 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.DataDocumentationResult.SchemaB\x03\xe0\x41\x03\x12M\n\x07queries\x18\x04 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.QueryB\x03\xe0\x41\x03\x1a\x33\n\x05Query\x12\x10\n\x03sql\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1aV\n\x06Schema\x12L\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.FieldB\x03\xe0\x41\x03\x1a\x82\x01\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12L\n\x06\x66ields\x18\x03 \x03(\x0b\x32\x37.google.cloud.dataplex.v1.DataDocumentationResult.FieldB\x03\xe0\x41\x03\x42\x08\n\x06resultBr\n\x1c\x63om.google.cloud.dataplex.v1B\x16\x44\x61taDocumentationProtoP\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 - DataDocumentationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationSpec").msgclass - DataDocumentationSpec::GenerationScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationSpec.GenerationScope").enummodule - DataDocumentationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult").msgclass - DataDocumentationResult::TableResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.TableResult").msgclass - DataDocumentationResult::Query = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.Query").msgclass - DataDocumentationResult::Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.Schema").msgclass - DataDocumentationResult::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataDocumentationResult.Field").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb deleted file mode 100644 index d1d5aea2dcd6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_profile_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_profile.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/dataplex/v1/datascans_common_pb' -require 'google/cloud/dataplex/v1/processing_pb' - - -descriptor_data = "\n+google/cloud/dataplex/v1/data_profile.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a/google/cloud/dataplex/v1/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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - DataProfileSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec").msgclass - DataProfileSpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions").msgclass - DataProfileSpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport").msgclass - DataProfileSpec::SelectedFields = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileSpec.SelectedFields").msgclass - DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult").msgclass - DataProfileResult::Profile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile").msgclass - DataProfileResult::Profile::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field").msgclass - DataProfileResult::Profile::Field::ProfileInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo").msgclass - DataProfileResult::Profile::Field::ProfileInfo::TopNValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue").msgclass - DataProfileResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult").msgclass - DataProfileResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult").msgclass - DataProfileResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb deleted file mode 100644 index f7bf38c1768a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_quality_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_quality.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/datascans_common_pb' -require 'google/cloud/dataplex/v1/processing_pb' - - -descriptor_data = "\n+google/cloud/dataplex/v1/data_quality.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/dataplex/v1/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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - DataQualitySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec").msgclass - DataQualitySpec::PostScanActions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions").msgclass - DataQualitySpec::PostScanActions::BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport").msgclass - DataQualitySpec::PostScanActions::Recipients = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients").msgclass - DataQualitySpec::PostScanActions::ScoreThresholdTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger").msgclass - DataQualitySpec::PostScanActions::JobFailureTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger").msgclass - DataQualitySpec::PostScanActions::JobEndTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger").msgclass - DataQualitySpec::PostScanActions::NotificationReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport").msgclass - DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult").msgclass - DataQualityResult::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult").msgclass - DataQualityResult::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult").msgclass - DataQualityResult::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State").enummodule - 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 - DataQualityRule::RangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RangeExpectation").msgclass - DataQualityRule::NonNullExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation").msgclass - DataQualityRule::SetExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SetExpectation").msgclass - DataQualityRule::RegexExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RegexExpectation").msgclass - DataQualityRule::UniquenessExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation").msgclass - DataQualityRule::StatisticRangeExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation").msgclass - DataQualityRule::StatisticRangeExpectation::ColumnStatistic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic").enummodule - DataQualityRule::RowConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation").msgclass - DataQualityRule::TableConditionExpectation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation").msgclass - DataQualityRule::SqlAssertion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityRule.SqlAssertion").msgclass - 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 - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb deleted file mode 100644 index af7b1b394a0b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/data_scan_service/credentials" -require "google/cloud/dataplex/v1/data_scan_service/paths" -require "google/cloud/dataplex/v1/data_scan_service/operations" -require "google/cloud/dataplex/v1/data_scan_service/client" -require "google/cloud/dataplex/v1/data_scan_service/rest" - -module Google - module Cloud - module Dataplex - module V1 - ## - # DataScanService manages DataScan resources which can be configured to run - # various types of data scanning workload and generate enriched metadata (e.g. - # Data Profile, Data Quality) for the data source. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/data_scan_service" - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/data_scan_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - module DataScanService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_scan_service", "helpers.rb" -require "google/cloud/dataplex/v1/data_scan_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb deleted file mode 100644 index 6e5073a0070d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +++ /dev/null @@ -1,1398 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - ## - # Client for the DataScanService service. - # - # DataScanService manages DataScan resources which can be configured to run - # various types of data scanning workload and generate enriched metadata (e.g. - # Data Profile, Data Quality) for the data source. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_scan_service_stub - - ## - # Configure the DataScanService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataScanService clients - # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_scan_service_stub.universe_domain - end - - ## - # Create a new DataScanService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataScanService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/datascans_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_scan_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::DataScanService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @data_scan_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - config.logger = @data_scan_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - config.logger = @data_scan_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataScanService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_scan_service_stub.logger - end - - # Service calls - - ## - # Creates a DataScan resource. - # - # @overload create_data_scan(request, options = nil) - # Pass arguments to `create_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) - # Pass arguments to `create_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent location: - # `projects/{project}/locations/{location_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource. - # @param data_scan_id [::String] - # Required. DataScan identifier. - # - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique within the customer project / location. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new - # - # # Call the create_data_scan method. - # result = client.create_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_scan.metadata.to_h - - # Set x-goog-api-client, 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_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :create_data_scan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataScan resource. - # - # @overload update_data_scan(request, options = nil) - # Pass arguments to `update_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource to be updated. - # - # Only fields specified in `update_mask` are updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new - # - # # Call the update_data_scan method. - # result = client.update_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_scan.metadata.to_h - - # Set x-goog-api-client, 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_scan&.name - header_params["data_scan.name"] = request.data_scan.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :update_data_scan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataScan resource. - # - # @overload delete_data_scan(request, options = nil) - # Pass arguments to `delete_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_scan(name: nil, force: nil) - # Pass arguments to `delete_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataScan: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param force [::Boolean] - # Optional. If set to true, any child resources of this data scan will also - # be deleted. (Otherwise, the request will only work if the data scan has no - # child resources.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new - # - # # Call the delete_data_scan method. - # result = client.delete_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_scan.metadata.to_h - - # Set x-goog-api-client, 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_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :delete_data_scan, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScan resource. - # - # @overload get_data_scan(request, options = nil) - # Pass arguments to `get_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_scan(name: nil, view: nil) - # Pass arguments to `get_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataScan: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] - # Optional. Select the DataScan view to return. Defaults to `BASIC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScan] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new - # - # # Call the get_data_scan method. - # result = client.get_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. - # p result - # - def get_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_scan.metadata.to_h - - # Set x-goog-api-client, 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_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :get_data_scan, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScans. - # - # @overload list_data_scans(request, options = nil) - # Pass arguments to `list_data_scans` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_scans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent location: - # `projects/{project}/locations/{location_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of dataScans to return. The service may return - # fewer than this value. If unspecified, at most 500 scans will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListDataScans` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListDataScans` must match the call that provided the - # page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new - # - # # Call the list_data_scans method. - # result = client.list_data_scans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. - # p item - # end - # - def list_data_scans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_scans.metadata.to_h - - # Set x-goog-api-client, 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_data_scans.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_scans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :list_data_scans, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs an on-demand execution of a DataScan - # - # @overload run_data_scan(request, options = nil) - # Pass arguments to `run_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_data_scan(name: nil) - # Pass arguments to `run_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataScan: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # - # Only **OnDemand** data scans are allowed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new - # - # # Call the run_data_scan method. - # result = client.run_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. - # p result - # - def run_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_data_scan.metadata.to_h - - # Set x-goog-api-client, 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.run_data_scan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :run_data_scan, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScanJob resource. - # - # @overload get_data_scan_job(request, options = nil) - # Pass arguments to `get_data_scan_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_scan_job(name: nil, view: nil) - # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataScanJob: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] - # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScanJob] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new - # - # # Call the get_data_scan_job method. - # result = client.get_data_scan_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. - # p result - # - def get_data_scan_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_scan_job.metadata.to_h - - # Set x-goog-api-client, 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_data_scan_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_scan_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :get_data_scan_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScanJobs under the given DataScan. - # - # @overload list_data_scan_jobs(request, options = nil) - # Pass arguments to `list_data_scan_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of DataScanJobs to return. The service may return - # fewer than this value. If unspecified, at most 10 DataScanJobs will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListDataScanJobs` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListDataScanJobs` must match the call that provided - # the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the ListDataScanJobs - # request. - # - # If unspecified, all datascan jobs will be returned. Multiple filters can be - # applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - # - # Allowed fields are: - # - # - `start_time` - # - `end_time` - # - # `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - # 2018-10-08T18:30:00-07:00). - # - # For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - # 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - # specified start and end times. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new - # - # # Call the list_data_scan_jobs method. - # result = client.list_data_scan_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. - # p item - # end - # - def list_data_scan_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h - - # Set x-goog-api-client, 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_data_scan_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :list_data_scan_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates recommended data quality rules based on the results of a data - # profiling scan. - # - # Use the recommendations to build rules for a data quality scan. - # - # @overload generate_data_quality_rules(request, options = nil) - # Pass arguments to `generate_data_quality_rules` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload generate_data_quality_rules(name: nil) - # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name must be one of the following: - # - # * The name of a data scan with at least one successful, completed data - # profiling job - # * The name of a successful, completed data profiling job (a data scan job - # where the job type is data profiling) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new - # - # # Call the generate_data_quality_rules method. - # result = client.generate_data_quality_rules request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. - # p result - # - def generate_data_quality_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h - - # Set x-goog-api-client, 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.generate_data_quality_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.call_rpc :generate_data_quality_rules, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataScanService API. - # - # This class represents the configuration for DataScanService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_scan to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`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::Cloud::Dataplex::V1::DataScanService::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 DataScanService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_scan - ## - # RPC-specific configuration for `update_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_scan - ## - # RPC-specific configuration for `delete_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_scan - ## - # RPC-specific configuration for `get_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan - ## - # RPC-specific configuration for `list_data_scans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scans - ## - # RPC-specific configuration for `run_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :run_data_scan - ## - # RPC-specific configuration for `get_data_scan_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan_job - ## - # RPC-specific configuration for `list_data_scan_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scan_jobs - ## - # RPC-specific configuration for `generate_data_quality_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_data_quality_rules - - # @private - def initialize parent_rpcs = nil - create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan - @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config - update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan - @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config - delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan - @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config - get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan - @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config - list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans - @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config - run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan - @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config - get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job - @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config - list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs - @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config - generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules - @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb deleted file mode 100644 index 42a335dd36b4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # Credentials for the DataScanService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb deleted file mode 100644 index 88220c65ab6b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# 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 DataScanService - # 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 DataScanService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb deleted file mode 100644 index 18231b24daf4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb +++ /dev/null @@ -1,163 +0,0 @@ -# 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 - module DataScanService - # Path helper methods for the DataScanService API. - module Paths - ## - # Create a fully-qualified Connection resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connections/{connection}` - # - # @param project [String] - # @param location [String] - # @param connection [String] - # - # @return [::String] - def connection_path project:, location:, connection: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connections/#{connection}" - end - - ## - # Create a fully-qualified DataScan resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataScans/{data_scan}` - # - # @param project [String] - # @param location [String] - # @param data_scan [String] - # - # @return [::String] - def data_scan_path project:, location:, data_scan: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataScans/#{data_scan}" - end - - ## - # Create a fully-qualified DataScanJob resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataScans/{data_scan}/jobs/{job}` - # - # @param project [String] - # @param location [String] - # @param data_scan [String] - # @param job [String] - # - # @return [::String] - def data_scan_job_path project:, location:, data_scan:, job: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "data_scan cannot contain /" if data_scan.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataScans/#{data_scan}/jobs/#{job}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}` - # - # @param project [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified Entity resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param entity [String] - # - # @return [::String] - def entity_path project:, location:, lake:, zone:, entity: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb deleted file mode 100644 index 94ca6428c4c8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/data_scan_service/credentials" -require "google/cloud/dataplex/v1/data_scan_service/paths" -require "google/cloud/dataplex/v1/data_scan_service/rest/operations" -require "google/cloud/dataplex/v1/data_scan_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # DataScanService manages DataScan resources which can be configured to run - # various types of data scanning workload and generate enriched metadata (e.g. - # Data Profile, Data Quality) for the data source. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/data_scan_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - module DataScanService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/data_scan_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb deleted file mode 100644 index ca085ec3e870..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +++ /dev/null @@ -1,1301 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/datascans_pb" -require "google/cloud/dataplex/v1/data_scan_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - module Rest - ## - # REST client for the DataScanService service. - # - # DataScanService manages DataScan resources which can be configured to run - # various types of data scanning workload and generate enriched metadata (e.g. - # Data Profile, Data Quality) for the data source. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_scan_service_stub - - ## - # Configure the DataScanService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataScanService clients - # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_scan_service_stub.universe_domain - end - - ## - # Create a new DataScanService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataScanService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_scan_service_stub = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_scan_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @data_scan_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 = @data_scan_service_stub.endpoint - config.universe_domain = @data_scan_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @data_scan_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataScanService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_scan_service_stub.logger - end - - # Service calls - - ## - # Creates a DataScan resource. - # - # @overload create_data_scan(request, options = nil) - # Pass arguments to `create_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil, validate_only: nil) - # Pass arguments to `create_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent location: - # `projects/{project}/locations/{location_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource. - # @param data_scan_id [::String] - # Required. DataScan identifier. - # - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique within the customer project / location. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new - # - # # Call the create_data_scan method. - # result = client.create_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_scan.metadata.to_h - - # Set x-goog-api-client, 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_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.create_data_scan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataScan resource. - # - # @overload update_data_scan(request, options = nil) - # Pass arguments to `update_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_scan(data_scan: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash] - # Required. DataScan resource to be updated. - # - # Only fields specified in `update_mask` are updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # 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::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new - # - # # Call the update_data_scan method. - # result = client.update_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_scan.metadata.to_h - - # Set x-goog-api-client, 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_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.update_data_scan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataScan resource. - # - # @overload delete_data_scan(request, options = nil) - # Pass arguments to `delete_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_scan(name: nil, force: nil) - # Pass arguments to `delete_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataScan: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param force [::Boolean] - # Optional. If set to true, any child resources of this data scan will also - # be deleted. (Otherwise, the request will only work if the data scan has no - # child resources.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new - # - # # Call the delete_data_scan method. - # result = client.delete_data_scan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_scan.metadata.to_h - - # Set x-goog-api-client, 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_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.delete_data_scan request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScan resource. - # - # @overload get_data_scan(request, options = nil) - # Pass arguments to `get_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_scan(name: nil, view: nil) - # Pass arguments to `get_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataScan: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] - # Optional. Select the DataScan view to return. Defaults to `BASIC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new - # - # # Call the get_data_scan method. - # result = client.get_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. - # p result - # - def get_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_scan.metadata.to_h - - # Set x-goog-api-client, 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_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.get_data_scan request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScans. - # - # @overload list_data_scans(request, options = nil) - # Pass arguments to `list_data_scans` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_scans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent location: - # `projects/{project}/locations/{location_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of dataScans to return. The service may return - # fewer than this value. If unspecified, at most 500 scans will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListDataScans` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListDataScans` must match the call that provided the - # page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new - # - # # Call the list_data_scans method. - # result = client.list_data_scans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. - # p item - # end - # - def list_data_scans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_scans.metadata.to_h - - # Set x-goog-api-client, 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_data_scans.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_scans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.list_data_scans request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, "data_scans", 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 - - ## - # Runs an on-demand execution of a DataScan - # - # @overload run_data_scan(request, options = nil) - # Pass arguments to `run_data_scan` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_data_scan(name: nil) - # Pass arguments to `run_data_scan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataScan: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # - # Only **OnDemand** data scans are allowed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new - # - # # Call the run_data_scan method. - # result = client.run_data_scan request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. - # p result - # - def run_data_scan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_data_scan.metadata.to_h - - # Set x-goog-api-client, 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.run_data_scan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_data_scan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.run_data_scan request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a DataScanJob resource. - # - # @overload get_data_scan_job(request, options = nil) - # Pass arguments to `get_data_scan_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_scan_job(name: nil, view: nil) - # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataScanJob: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] - # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new - # - # # Call the get_data_scan_job method. - # result = client.get_data_scan_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. - # p result - # - def get_data_scan_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_scan_job.metadata.to_h - - # Set x-goog-api-client, 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_data_scan_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_scan_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.get_data_scan_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataScanJobs under the given DataScan. - # - # @overload list_data_scan_jobs(request, options = nil) - # Pass arguments to `list_data_scan_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of DataScanJobs to return. The service may return - # fewer than this value. If unspecified, at most 10 DataScanJobs will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListDataScanJobs` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListDataScanJobs` must match the call that provided - # the page token. - # @param filter [::String] - # Optional. An expression for filtering the results of the ListDataScanJobs - # request. - # - # If unspecified, all datascan jobs will be returned. Multiple filters can be - # applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - # - # Allowed fields are: - # - # - `start_time` - # - `end_time` - # - # `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - # 2018-10-08T18:30:00-07:00). - # - # For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - # 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - # specified start and end times. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new - # - # # Call the list_data_scan_jobs method. - # result = client.list_data_scan_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. - # p item - # end - # - def list_data_scan_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h - - # Set x-goog-api-client, 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_data_scan_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.list_data_scan_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, "data_scan_jobs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates recommended data quality rules based on the results of a data - # profiling scan. - # - # Use the recommendations to build rules for a data quality scan. - # - # @overload generate_data_quality_rules(request, options = nil) - # Pass arguments to `generate_data_quality_rules` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload generate_data_quality_rules(name: nil) - # Pass arguments to `generate_data_quality_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name must be one of the following: - # - # * The name of a data scan with at least one successful, completed data - # profiling job - # * The name of a successful, completed data profiling job (a data scan job - # where the job type is data profiling) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new - # - # # Call the generate_data_quality_rules method. - # result = client.generate_data_quality_rules request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. - # p result - # - def generate_data_quality_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.generate_data_quality_rules.metadata.to_h - - # Set x-goog-api-client, 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.generate_data_quality_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_data_quality_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_scan_service_stub.generate_data_quality_rules request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataScanService REST API. - # - # This class represents the configuration for DataScanService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_scan to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_scan.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # 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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - 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 DataScanService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_scan - ## - # RPC-specific configuration for `update_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_scan - ## - # RPC-specific configuration for `delete_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_scan - ## - # RPC-specific configuration for `get_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan - ## - # RPC-specific configuration for `list_data_scans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scans - ## - # RPC-specific configuration for `run_data_scan` - # @return [::Gapic::Config::Method] - # - attr_reader :run_data_scan - ## - # RPC-specific configuration for `get_data_scan_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_scan_job - ## - # RPC-specific configuration for `list_data_scan_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_scan_jobs - ## - # RPC-specific configuration for `generate_data_quality_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_data_quality_rules - - # @private - def initialize parent_rpcs = nil - create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan - @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config - update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan - @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config - delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan - @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config - get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan - @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config - list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans - @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config - run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan - @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config - get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job - @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config - list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs - @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config - generate_data_quality_rules_config = parent_rpcs.generate_data_quality_rules if parent_rpcs.respond_to? :generate_data_quality_rules - @generate_data_quality_rules = ::Gapic::Config::Method.new generate_data_quality_rules_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb deleted file mode 100644 index a47c9519b156..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +++ /dev/null @@ -1,954 +0,0 @@ -# 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 DataScanService - 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 DataScanService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataScanService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb deleted file mode 100644 index e5d885940f89..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +++ /dev/null @@ -1,642 +0,0 @@ -# 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 "google/cloud/dataplex/v1/datascans_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - module Rest - ## - # REST service stub for the DataScanService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_data_scan", - 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_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_scan", - 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_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_data_scan", - 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_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # A result object deserialized from the server's reply - def get_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_scan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataScan.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_scans REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataScansResponse] - # A result object deserialized from the server's reply - def list_data_scans request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scans_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_scans", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the run_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse] - # A result object deserialized from the server's reply - def run_data_scan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_data_scan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_data_scan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.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_scan_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataScanJob] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # A result object deserialized from the server's reply - def get_data_scan_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_scan_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_scan_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataScanJob.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_scan_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse] - # A result object deserialized from the server's reply - def list_data_scan_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_scan_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_scan_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the generate_data_quality_rules REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse] - # A result object deserialized from the server's reply - def generate_data_quality_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_data_quality_rules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "generate_data_quality_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.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 create_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataScans", - body: "data_scan", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_scan.name}", - body: "data_scan", - matches: [ - ["data_scan.name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_scans REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScansRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_scans_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataScans", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_data_scan REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunDataScanRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_data_scan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_scan_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_scan_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_scan_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_scan_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_data_quality_rules REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_data_quality_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:generateDataQualityRules", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:generateDataQualityRules", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataScans/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb deleted file mode 100644 index b3ef13103a56..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/data_taxonomy.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/security_pb' -require 'google/cloud/dataplex/v1/service_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/dataplex/v1/data_taxonomy.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/dataplex/v1/security.proto\x1a&google/cloud/dataplex/v1/service.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - DataTaxonomy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataTaxonomy").msgclass - DataAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttribute").msgclass - DataAttributeBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding").msgclass - DataAttributeBinding::Path = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAttributeBinding.Path").msgclass - CreateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataTaxonomyRequest").msgclass - UpdateDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataTaxonomyRequest").msgclass - GetDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataTaxonomyRequest").msgclass - ListDataTaxonomiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesRequest").msgclass - ListDataTaxonomiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataTaxonomiesResponse").msgclass - DeleteDataTaxonomyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataTaxonomyRequest").msgclass - CreateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeRequest").msgclass - UpdateDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeRequest").msgclass - GetDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeRequest").msgclass - ListDataAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesRequest").msgclass - ListDataAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributesResponse").msgclass - DeleteDataAttributeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeRequest").msgclass - CreateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataAttributeBindingRequest").msgclass - UpdateDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest").msgclass - GetDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataAttributeBindingRequest").msgclass - ListDataAttributeBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsRequest").msgclass - ListDataAttributeBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataAttributeBindingsResponse").msgclass - DeleteDataAttributeBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb deleted file mode 100644 index 3a498e42dff4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# 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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" -require "google/cloud/dataplex/v1/data_taxonomy_service/paths" -require "google/cloud/dataplex/v1/data_taxonomy_service/operations" -require "google/cloud/dataplex/v1/data_taxonomy_service/client" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - -module Google - module Cloud - module Dataplex - module V1 - ## - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - # @deprecated This service is deprecated and may be removed in the next major version update. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/data_taxonomy_service" - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - module DataTaxonomyService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_taxonomy_service", "helpers.rb" -require "google/cloud/dataplex/v1/data_taxonomy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb deleted file mode 100644 index 5443aceee087..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +++ /dev/null @@ -1,2060 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - ## - # Client for the DataTaxonomyService service. - # - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_taxonomy_service_stub - - ## - # Configure the DataTaxonomyService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} - # for a description of the configuration fields. - # - # @deprecated This service is deprecated and may be removed in the next major version update. - # - # @example - # - # # Modify the configuration for all DataTaxonomyService clients - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_taxonomy_service_stub.universe_domain - end - - ## - # Create a new DataTaxonomyService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTaxonomyService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/data_taxonomy_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_taxonomy_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @data_taxonomy_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_taxonomy_service_stub.logger - end - - # Service calls - - ## - # Create a DataTaxonomy resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload create_data_taxonomy(request, options = nil) - # Pass arguments to `create_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # @param data_taxonomy_id [::String] - # Required. DataTaxonomy identifier. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must be between 1-63 characters. - # * Must end with a number or a letter. - # * Must be unique within the Project. - # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. DataTaxonomy resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new - # - # # Call the create_data_taxonomy method. - # result = client.create_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_taxonomy.metadata.to_h - - # Set x-goog-api-client, 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_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :create_data_taxonomy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataTaxonomy resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload update_data_taxonomy(request, options = nil) - # Pass arguments to `update_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new - # - # # Call the update_data_taxonomy method. - # result = client.update_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_taxonomy.metadata.to_h - - # Set x-goog-api-client, 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_taxonomy&.name - header_params["data_taxonomy.name"] = request.data_taxonomy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :update_data_taxonomy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - # must be deleted before the DataTaxonomy can be deleted. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload delete_data_taxonomy(request, options = nil) - # Pass arguments to `delete_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_taxonomy(name: nil, etag: nil) - # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value,the DeleteDataTaxonomy method returns an ABORTED error. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new - # - # # Call the delete_data_taxonomy method. - # result = client.delete_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h - - # Set x-goog-api-client, 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_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :delete_data_taxonomy, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataTaxonomy resources in a project and location. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload list_data_taxonomies(request, options = nil) - # Pass arguments to `list_data_taxonomies` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the DataTaxonomy location, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of DataTaxonomies to return. The service may - # return fewer than this value. If unspecified, at most 10 DataTaxonomies - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous ` ListDataTaxonomies` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to ` ListDataTaxonomies` must match the call that - # provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new - # - # # Call the list_data_taxonomies method. - # result = client.list_data_taxonomies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. - # p item - # end - # - def list_data_taxonomies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_taxonomies.metadata.to_h - - # Set x-goog-api-client, 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_data_taxonomies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_taxonomies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :list_data_taxonomies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataTaxonomy resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload get_data_taxonomy(request, options = nil) - # Pass arguments to `get_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_taxonomy(name: nil) - # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new - # - # # Call the get_data_taxonomy method. - # result = client.get_data_taxonomy request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. - # p result - # - def get_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_taxonomy.metadata.to_h - - # Set x-goog-api-client, 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_data_taxonomy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :get_data_taxonomy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttributeBinding resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload create_data_attribute_binding(request, options = nil) - # Pass arguments to `create_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id} - # @param data_attribute_binding_id [::String] - # Required. DataAttributeBinding identifier. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must be between 1-63 characters. - # * Must end with a number or a letter. - # * Must be unique within the Location. - # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. DataAttributeBinding resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new - # - # # Call the create_data_attribute_binding method. - # result = client.create_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :create_data_attribute_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttributeBinding resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload update_data_attribute_binding(request, options = nil) - # Pass arguments to `update_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new - # - # # Call the update_data_attribute_binding method. - # result = client.update_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client, 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_attribute_binding&.name - header_params["data_attribute_binding.name"] = request.data_attribute_binding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :update_data_attribute_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataAttributeBinding resource. All attributes within the - # DataAttributeBinding must be deleted before the DataAttributeBinding can be - # deleted. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload delete_data_attribute_binding(request, options = nil) - # Pass arguments to `delete_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_attribute_binding(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @param etag [::String] - # Required. If the client provided etag value does not match the current etag - # value, the DeleteDataAttributeBindingRequest method returns an ABORTED - # error response. Etags must be used when calling the - # DeleteDataAttributeBinding. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new - # - # # Call the delete_data_attribute_binding method. - # result = client.delete_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client, 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_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :delete_data_attribute_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataAttributeBinding resources in a project and location. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload list_data_attribute_bindings(request, options = nil) - # Pass arguments to `list_data_attribute_bindings` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the Location: - # projects/\\{project_number}/locations/\\{location_id} - # @param page_size [::Integer] - # Optional. Maximum number of DataAttributeBindings to return. The service - # may return fewer than this value. If unspecified, at most 10 - # DataAttributeBindings will be returned. The maximum value is 1000; values - # above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListDataAttributeBindings` - # call. Provide this to retrieve the subsequent page. When paginating, all - # other parameters provided to `ListDataAttributeBindings` must match the - # call that provided the page token. - # @param filter [::String] - # Optional. Filter request. - # Filter using resource: filter=resource:"resource-name" - # Filter using attribute: filter=attributes:"attribute-name" - # Filter using attribute in paths list: - # filter=paths.attributes:"attribute-name" - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new - # - # # Call the list_data_attribute_bindings method. - # result = client.list_data_attribute_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p item - # end - # - def list_data_attribute_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :list_data_attribute_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a DataAttributeBinding resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload get_data_attribute_binding(request, options = nil) - # Pass arguments to `get_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_attribute_binding(name: nil) - # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new - # - # # Call the get_data_attribute_binding method. - # result = client.get_data_attribute_binding request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p result - # - def get_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :get_data_attribute_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttribute resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload create_data_attribute(request, options = nil) - # Pass arguments to `create_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `create_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param data_attribute_id [::String] - # Required. DataAttribute identifier. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must be between 1-63 characters. - # * Must end with a number or a letter. - # * Must be unique within the DataTaxonomy. - # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. DataAttribute resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new - # - # # Call the create_data_attribute method. - # result = client.create_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_data_attribute.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :create_data_attribute, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttribute resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload update_data_attribute(request, options = nil) - # Pass arguments to `update_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `update_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new - # - # # Call the update_data_attribute method. - # result = client.update_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_data_attribute.metadata.to_h - - # Set x-goog-api-client, 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_attribute&.name - header_params["data_attribute.name"] = request.data_attribute.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :update_data_attribute, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Data Attribute resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload delete_data_attribute(request, options = nil) - # Pass arguments to `delete_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_data_attribute(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteDataAttribute method returns an ABORTED error response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new - # - # # Call the delete_data_attribute method. - # result = client.delete_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_data_attribute.metadata.to_h - - # Set x-goog-api-client, 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_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :delete_data_attribute, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Data Attribute resources in a DataTaxonomy. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload list_data_attributes(request, options = nil) - # Pass arguments to `list_data_attributes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param page_size [::Integer] - # Optional. Maximum number of DataAttributes to return. The service may - # return fewer than this value. If unspecified, at most 10 dataAttributes - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListDataAttributes` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListDataAttributes` must match the call that - # provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new - # - # # Call the list_data_attributes method. - # result = client.list_data_attributes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. - # p item - # end - # - def list_data_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_data_attributes.metadata.to_h - - # Set x-goog-api-client, 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_data_attributes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :list_data_attributes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a Data Attribute resource. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload get_data_attribute(request, options = nil) - # Pass arguments to `get_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_data_attribute(name: nil) - # Pass arguments to `get_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::DataAttribute] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new - # - # # Call the get_data_attribute method. - # result = client.get_data_attribute request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. - # p result - # - def get_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_data_attribute.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.call_rpc :get_data_attribute, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataTaxonomyService API. - # - # This class represents the configuration for DataTaxonomyService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_taxonomy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`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::Cloud::Dataplex::V1::DataTaxonomyService::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 DataTaxonomyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_taxonomy - ## - # RPC-specific configuration for `update_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_taxonomy - ## - # RPC-specific configuration for `delete_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_taxonomy - ## - # RPC-specific configuration for `list_data_taxonomies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_taxonomies - ## - # RPC-specific configuration for `get_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_taxonomy - ## - # RPC-specific configuration for `create_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute_binding - ## - # RPC-specific configuration for `update_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute_binding - ## - # RPC-specific configuration for `delete_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute_binding - ## - # RPC-specific configuration for `list_data_attribute_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attribute_bindings - ## - # RPC-specific configuration for `get_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute_binding - ## - # RPC-specific configuration for `create_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute - ## - # RPC-specific configuration for `update_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute - ## - # RPC-specific configuration for `delete_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute - ## - # RPC-specific configuration for `list_data_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attributes - ## - # RPC-specific configuration for `get_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute - - # @private - def initialize parent_rpcs = nil - create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy - @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config - update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy - @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config - delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy - @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config - list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies - @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config - get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy - @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config - create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding - @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config - update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding - @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config - delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding - @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config - list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings - @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config - get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding - @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config - create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute - @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config - update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute - @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config - delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute - @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config - list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes - @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config - get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute - @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb deleted file mode 100644 index 0658f853f858..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # Credentials for the DataTaxonomyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb deleted file mode 100644 index c26ba3d485bf..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# 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 DataTaxonomyService - # 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 DataTaxonomyService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb deleted file mode 100644 index 2e020a367723..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/paths.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 - module DataTaxonomyService - # Path helper methods for the DataTaxonomyService API. - module Paths - ## - # Create a fully-qualified DataAttribute resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy}/attributes/{data_attribute_id}` - # - # @param project [String] - # @param location [String] - # @param data_taxonomy [String] - # @param data_attribute_id [String] - # - # @return [::String] - def data_attribute_path project:, location:, data_taxonomy:, data_attribute_id: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "data_taxonomy cannot contain /" if data_taxonomy.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataTaxonomies/#{data_taxonomy}/attributes/#{data_attribute_id}" - end - - ## - # Create a fully-qualified DataAttributeBinding resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}` - # - # @param project [String] - # @param location [String] - # @param data_attribute_binding_id [String] - # - # @return [::String] - def data_attribute_binding_path project:, location:, data_attribute_binding_id: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataAttributeBindings/#{data_attribute_binding_id}" - end - - ## - # Create a fully-qualified DataTaxonomy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}` - # - # @param project [String] - # @param location [String] - # @param data_taxonomy_id [String] - # - # @return [::String] - def data_taxonomy_path project:, location:, data_taxonomy_id: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataTaxonomies/#{data_taxonomy_id}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb deleted file mode 100644 index d1b1b0fb22b8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/data_taxonomy_service/credentials" -require "google/cloud/dataplex/v1/data_taxonomy_service/paths" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/operations" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - module DataTaxonomyService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb deleted file mode 100644 index fbf0dcd9f1ad..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +++ /dev/null @@ -1,1890 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/data_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - module Rest - ## - # REST client for the DataTaxonomyService service. - # - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_taxonomy_service_stub - - ## - # Configure the DataTaxonomyService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # @deprecated This service is deprecated and may be removed in the next major version update. - # - # @example - # - # # Modify the configuration for all DataTaxonomyService clients - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @data_taxonomy_service_stub.universe_domain - end - - ## - # Create a new DataTaxonomyService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTaxonomyService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_taxonomy_service_stub = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_taxonomy_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @data_taxonomy_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 = @data_taxonomy_service_stub.endpoint - config.universe_domain = @data_taxonomy_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_taxonomy_service_stub.logger - end - - # Service calls - - ## - # Create a DataTaxonomy resource. - # - # @overload create_data_taxonomy(request, options = nil) - # Pass arguments to `create_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_taxonomy(parent: nil, data_taxonomy_id: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `create_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # @param data_taxonomy_id [::String] - # Required. DataTaxonomy identifier. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must be between 1-63 characters. - # * Must end with a number or a letter. - # * Must be unique within the Project. - # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. DataTaxonomy resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new - # - # # Call the create_data_taxonomy method. - # result = client.create_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_taxonomy.metadata.to_h - - # Set x-goog-api-client, 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_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.create_data_taxonomy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataTaxonomy resource. - # - # @overload update_data_taxonomy(request, options = nil) - # Pass arguments to `update_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_taxonomy(update_mask: nil, data_taxonomy: nil, validate_only: nil) - # Pass arguments to `update_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_taxonomy [::Google::Cloud::Dataplex::V1::DataTaxonomy, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new - # - # # Call the update_data_taxonomy method. - # result = client.update_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_taxonomy.metadata.to_h - - # Set x-goog-api-client, 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_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.update_data_taxonomy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - # must be deleted before the DataTaxonomy can be deleted. - # - # @overload delete_data_taxonomy(request, options = nil) - # Pass arguments to `delete_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_taxonomy(name: nil, etag: nil) - # Pass arguments to `delete_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value,the DeleteDataTaxonomy method returns an ABORTED error. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new - # - # # Call the delete_data_taxonomy method. - # result = client.delete_data_taxonomy request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_taxonomy.metadata.to_h - - # Set x-goog-api-client, 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_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.delete_data_taxonomy request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataTaxonomy resources in a project and location. - # - # @overload list_data_taxonomies(request, options = nil) - # Pass arguments to `list_data_taxonomies` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_taxonomies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_taxonomies` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the DataTaxonomy location, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of DataTaxonomies to return. The service may - # return fewer than this value. If unspecified, at most 10 DataTaxonomies - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous ` ListDataTaxonomies` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to ` ListDataTaxonomies` must match the call that - # provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new - # - # # Call the list_data_taxonomies method. - # result = client.list_data_taxonomies request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. - # p item - # end - # - def list_data_taxonomies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_taxonomies.metadata.to_h - - # Set x-goog-api-client, 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_data_taxonomies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_taxonomies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.list_data_taxonomies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, "data_taxonomies", 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 - - ## - # Retrieves a DataTaxonomy resource. - # - # @overload get_data_taxonomy(request, options = nil) - # Pass arguments to `get_data_taxonomy` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_taxonomy(name: nil) - # Pass arguments to `get_data_taxonomy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new - # - # # Call the get_data_taxonomy method. - # result = client.get_data_taxonomy request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. - # p result - # - def get_data_taxonomy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_taxonomy.metadata.to_h - - # Set x-goog-api-client, 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_data_taxonomy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_taxonomy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.get_data_taxonomy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttributeBinding resource. - # - # @overload create_data_attribute_binding(request, options = nil) - # Pass arguments to `create_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_attribute_binding(parent: nil, data_attribute_binding_id: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `create_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id} - # @param data_attribute_binding_id [::String] - # Required. DataAttributeBinding identifier. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must be between 1-63 characters. - # * Must end with a number or a letter. - # * Must be unique within the Location. - # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. DataAttributeBinding resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new - # - # # Call the create_data_attribute_binding method. - # result = client.create_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.create_data_attribute_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttributeBinding resource. - # - # @overload update_data_attribute_binding(request, options = nil) - # Pass arguments to `update_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_attribute_binding(update_mask: nil, data_attribute_binding: nil, validate_only: nil) - # Pass arguments to `update_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute_binding [::Google::Cloud::Dataplex::V1::DataAttributeBinding, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new - # - # # Call the update_data_attribute_binding method. - # result = client.update_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client, 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_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.update_data_attribute_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a DataAttributeBinding resource. All attributes within the - # DataAttributeBinding must be deleted before the DataAttributeBinding can be - # deleted. - # - # @overload delete_data_attribute_binding(request, options = nil) - # Pass arguments to `delete_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_attribute_binding(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @param etag [::String] - # Required. If the client provided etag value does not match the current etag - # value, the DeleteDataAttributeBindingRequest method returns an ABORTED - # error response. Etags must be used when calling the - # DeleteDataAttributeBinding. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new - # - # # Call the delete_data_attribute_binding method. - # result = client.delete_data_attribute_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client, 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_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.delete_data_attribute_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists DataAttributeBinding resources in a project and location. - # - # @overload list_data_attribute_bindings(request, options = nil) - # Pass arguments to `list_data_attribute_bindings` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_attribute_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attribute_bindings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the Location: - # projects/\\{project_number}/locations/\\{location_id} - # @param page_size [::Integer] - # Optional. Maximum number of DataAttributeBindings to return. The service - # may return fewer than this value. If unspecified, at most 10 - # DataAttributeBindings will be returned. The maximum value is 1000; values - # above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListDataAttributeBindings` - # call. Provide this to retrieve the subsequent page. When paginating, all - # other parameters provided to `ListDataAttributeBindings` must match the - # call that provided the page token. - # @param filter [::String] - # Optional. Filter request. - # Filter using resource: filter=resource:"resource-name" - # Filter using attribute: filter=attributes:"attribute-name" - # Filter using attribute in paths list: - # filter=paths.attributes:"attribute-name" - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new - # - # # Call the list_data_attribute_bindings method. - # result = client.list_data_attribute_bindings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p item - # end - # - def list_data_attribute_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_attribute_bindings.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_attribute_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.list_data_attribute_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, "data_attribute_bindings", 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 - - ## - # Retrieves a DataAttributeBinding resource. - # - # @overload get_data_attribute_binding(request, options = nil) - # Pass arguments to `get_data_attribute_binding` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_attribute_binding(name: nil) - # Pass arguments to `get_data_attribute_binding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new - # - # # Call the get_data_attribute_binding method. - # result = client.get_data_attribute_binding request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. - # p result - # - def get_data_attribute_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_attribute_binding.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_attribute_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.get_data_attribute_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a DataAttribute resource. - # - # @overload create_data_attribute(request, options = nil) - # Pass arguments to `create_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_data_attribute(parent: nil, data_attribute_id: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `create_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param data_attribute_id [::String] - # Required. DataAttribute identifier. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must be between 1-63 characters. - # * Must end with a number or a letter. - # * Must be unique within the DataTaxonomy. - # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. DataAttribute resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new - # - # # Call the create_data_attribute method. - # result = client.create_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_data_attribute.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.create_data_attribute request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a DataAttribute resource. - # - # @overload update_data_attribute(request, options = nil) - # Pass arguments to `update_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_data_attribute(update_mask: nil, data_attribute: nil, validate_only: nil) - # Pass arguments to `update_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param data_attribute [::Google::Cloud::Dataplex::V1::DataAttribute, ::Hash] - # Required. Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new - # - # # Call the update_data_attribute method. - # result = client.update_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_data_attribute.metadata.to_h - - # Set x-goog-api-client, 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_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.update_data_attribute request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Data Attribute resource. - # - # @overload delete_data_attribute(request, options = nil) - # Pass arguments to `delete_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_data_attribute(name: nil, etag: nil) - # Pass arguments to `delete_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the DataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @param etag [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteDataAttribute method returns an ABORTED error response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new - # - # # Call the delete_data_attribute method. - # result = client.delete_data_attribute request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_data_attribute.metadata.to_h - - # Set x-goog-api-client, 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_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.delete_data_attribute request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Data Attribute resources in a DataTaxonomy. - # - # @overload list_data_attributes(request, options = nil) - # Pass arguments to `list_data_attributes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListDataAttributesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_data_attributes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_data_attributes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @param page_size [::Integer] - # Optional. Maximum number of DataAttributes to return. The service may - # return fewer than this value. If unspecified, at most 10 dataAttributes - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListDataAttributes` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListDataAttributes` must match the call that - # provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataAttribute>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new - # - # # Call the list_data_attributes method. - # result = client.list_data_attributes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. - # p item - # end - # - def list_data_attributes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_data_attributes.metadata.to_h - - # Set x-goog-api-client, 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_data_attributes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_attributes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.list_data_attributes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, "data_attributes", 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 - - ## - # Retrieves a Data Attribute resource. - # - # @overload get_data_attribute(request, options = nil) - # Pass arguments to `get_data_attribute` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetDataAttributeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_data_attribute(name: nil) - # Pass arguments to `get_data_attribute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new - # - # # Call the get_data_attribute method. - # result = client.get_data_attribute request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. - # p result - # - def get_data_attribute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_data_attribute.metadata.to_h - - # Set x-goog-api-client, 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_data_attribute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_attribute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_taxonomy_service_stub.get_data_attribute request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataTaxonomyService REST API. - # - # This class represents the configuration for DataTaxonomyService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_data_taxonomy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_taxonomy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # 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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - 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 DataTaxonomyService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_taxonomy - ## - # RPC-specific configuration for `update_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_taxonomy - ## - # RPC-specific configuration for `delete_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_taxonomy - ## - # RPC-specific configuration for `list_data_taxonomies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_taxonomies - ## - # RPC-specific configuration for `get_data_taxonomy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_taxonomy - ## - # RPC-specific configuration for `create_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute_binding - ## - # RPC-specific configuration for `update_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute_binding - ## - # RPC-specific configuration for `delete_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute_binding - ## - # RPC-specific configuration for `list_data_attribute_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attribute_bindings - ## - # RPC-specific configuration for `get_data_attribute_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute_binding - ## - # RPC-specific configuration for `create_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_attribute - ## - # RPC-specific configuration for `update_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_attribute - ## - # RPC-specific configuration for `delete_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_attribute - ## - # RPC-specific configuration for `list_data_attributes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_attributes - ## - # RPC-specific configuration for `get_data_attribute` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_attribute - - # @private - def initialize parent_rpcs = nil - create_data_taxonomy_config = parent_rpcs.create_data_taxonomy if parent_rpcs.respond_to? :create_data_taxonomy - @create_data_taxonomy = ::Gapic::Config::Method.new create_data_taxonomy_config - update_data_taxonomy_config = parent_rpcs.update_data_taxonomy if parent_rpcs.respond_to? :update_data_taxonomy - @update_data_taxonomy = ::Gapic::Config::Method.new update_data_taxonomy_config - delete_data_taxonomy_config = parent_rpcs.delete_data_taxonomy if parent_rpcs.respond_to? :delete_data_taxonomy - @delete_data_taxonomy = ::Gapic::Config::Method.new delete_data_taxonomy_config - list_data_taxonomies_config = parent_rpcs.list_data_taxonomies if parent_rpcs.respond_to? :list_data_taxonomies - @list_data_taxonomies = ::Gapic::Config::Method.new list_data_taxonomies_config - get_data_taxonomy_config = parent_rpcs.get_data_taxonomy if parent_rpcs.respond_to? :get_data_taxonomy - @get_data_taxonomy = ::Gapic::Config::Method.new get_data_taxonomy_config - create_data_attribute_binding_config = parent_rpcs.create_data_attribute_binding if parent_rpcs.respond_to? :create_data_attribute_binding - @create_data_attribute_binding = ::Gapic::Config::Method.new create_data_attribute_binding_config - update_data_attribute_binding_config = parent_rpcs.update_data_attribute_binding if parent_rpcs.respond_to? :update_data_attribute_binding - @update_data_attribute_binding = ::Gapic::Config::Method.new update_data_attribute_binding_config - delete_data_attribute_binding_config = parent_rpcs.delete_data_attribute_binding if parent_rpcs.respond_to? :delete_data_attribute_binding - @delete_data_attribute_binding = ::Gapic::Config::Method.new delete_data_attribute_binding_config - list_data_attribute_bindings_config = parent_rpcs.list_data_attribute_bindings if parent_rpcs.respond_to? :list_data_attribute_bindings - @list_data_attribute_bindings = ::Gapic::Config::Method.new list_data_attribute_bindings_config - get_data_attribute_binding_config = parent_rpcs.get_data_attribute_binding if parent_rpcs.respond_to? :get_data_attribute_binding - @get_data_attribute_binding = ::Gapic::Config::Method.new get_data_attribute_binding_config - create_data_attribute_config = parent_rpcs.create_data_attribute if parent_rpcs.respond_to? :create_data_attribute - @create_data_attribute = ::Gapic::Config::Method.new create_data_attribute_config - update_data_attribute_config = parent_rpcs.update_data_attribute if parent_rpcs.respond_to? :update_data_attribute - @update_data_attribute = ::Gapic::Config::Method.new update_data_attribute_config - delete_data_attribute_config = parent_rpcs.delete_data_attribute if parent_rpcs.respond_to? :delete_data_attribute - @delete_data_attribute = ::Gapic::Config::Method.new delete_data_attribute_config - list_data_attributes_config = parent_rpcs.list_data_attributes if parent_rpcs.respond_to? :list_data_attributes - @list_data_attributes = ::Gapic::Config::Method.new list_data_attributes_config - get_data_attribute_config = parent_rpcs.get_data_attribute if parent_rpcs.respond_to? :get_data_attribute - @get_data_attribute = ::Gapic::Config::Method.new get_data_attribute_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb deleted file mode 100644 index a26453898044..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +++ /dev/null @@ -1,954 +0,0 @@ -# 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 DataTaxonomyService - 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 DataTaxonomyService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTaxonomyService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb deleted file mode 100644 index 8c9b093bd16f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +++ /dev/null @@ -1,1003 +0,0 @@ -# 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 "google/cloud/dataplex/v1/data_taxonomy_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - module Rest - ## - # REST service stub for the DataTaxonomyService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - # @deprecated This service is deprecated and may be removed in the next major version update. - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_data_taxonomy", - 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_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_taxonomy", - 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_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_data_taxonomy", - 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_data_taxonomies REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse] - # A result object deserialized from the server's reply - def list_data_taxonomies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_taxonomies_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_taxonomies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.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_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # A result object deserialized from the server's reply - def get_data_taxonomy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_taxonomy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_taxonomy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_data_attribute_binding", - 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_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_attribute_binding", - 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_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_data_attribute_binding", - 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_data_attribute_bindings REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse] - # A result object deserialized from the server's reply - def list_data_attribute_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attribute_bindings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_attribute_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.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_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # A result object deserialized from the server's reply - def get_data_attribute_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_binding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_attribute_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_data_attribute", - 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_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_attribute", - 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_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_data_attribute", - 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_data_attributes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListDataAttributesResponse] - # A result object deserialized from the server's reply - def list_data_attributes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_attributes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_data_attributes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.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_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::DataAttribute] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # A result object deserialized from the server's reply - def get_data_attribute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_attribute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_attribute", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::DataAttribute.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 create_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTaxonomies", - body: "data_taxonomy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_taxonomy.name}", - body: "data_taxonomy", - matches: [ - ["data_taxonomy.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_taxonomies REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_taxonomies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataTaxonomies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_taxonomy REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_taxonomy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataAttributeBindings", - body: "data_attribute_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_attribute_binding.name}", - body: "data_attribute_binding", - matches: [ - ["data_attribute_binding.name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_attribute_bindings REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_attribute_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataAttributeBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_attribute_binding REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_attribute_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataAttributeBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/attributes", - body: "data_attribute", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_attribute.name}", - body: "data_attribute", - matches: [ - ["data_attribute.name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_attributes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListDataAttributesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_data_attributes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attributes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_attribute REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetDataAttributeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_data_attribute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataTaxonomies/[^/]+/attributes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb deleted file mode 100644 index 1afe91274d1d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/data_taxonomy_services_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/data_taxonomy.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 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_taxonomy_pb' - -module Google - module Cloud - module Dataplex - module V1 - module DataTaxonomyService - # DataTaxonomyService enables attribute-based governance. The resources - # currently offered include DataTaxonomy and DataAttribute. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.DataTaxonomyService' - - # Create a DataTaxonomy resource. - rpc :CreateDataTaxonomy, ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, ::Google::Longrunning::Operation - # Updates a DataTaxonomy resource. - rpc :UpdateDataTaxonomy, ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, ::Google::Longrunning::Operation - # Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - # must be deleted before the DataTaxonomy can be deleted. - rpc :DeleteDataTaxonomy, ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, ::Google::Longrunning::Operation - # Lists DataTaxonomy resources in a project and location. - rpc :ListDataTaxonomies, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse - # Retrieves a DataTaxonomy resource. - rpc :GetDataTaxonomy, ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, ::Google::Cloud::Dataplex::V1::DataTaxonomy - # Create a DataAttributeBinding resource. - rpc :CreateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, ::Google::Longrunning::Operation - # Updates a DataAttributeBinding resource. - rpc :UpdateDataAttributeBinding, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, ::Google::Longrunning::Operation - # Deletes a DataAttributeBinding resource. All attributes within the - # DataAttributeBinding must be deleted before the DataAttributeBinding can be - # deleted. - rpc :DeleteDataAttributeBinding, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, ::Google::Longrunning::Operation - # Lists DataAttributeBinding resources in a project and location. - rpc :ListDataAttributeBindings, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse - # Retrieves a DataAttributeBinding resource. - rpc :GetDataAttributeBinding, ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, ::Google::Cloud::Dataplex::V1::DataAttributeBinding - # Create a DataAttribute resource. - rpc :CreateDataAttribute, ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, ::Google::Longrunning::Operation - # Updates a DataAttribute resource. - rpc :UpdateDataAttribute, ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, ::Google::Longrunning::Operation - # Deletes a Data Attribute resource. - rpc :DeleteDataAttribute, ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, ::Google::Longrunning::Operation - # Lists Data Attribute resources in a DataTaxonomy. - rpc :ListDataAttributes, ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse - # Retrieves a Data Attribute resource. - rpc :GetDataAttribute, ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, ::Google::Cloud::Dataplex::V1::DataAttribute - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb deleted file mode 100644 index 7d80f663f8ca..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" - -require "google/cloud/dataplex/v1/dataplex_service/credentials" -require "google/cloud/dataplex/v1/dataplex_service/paths" -require "google/cloud/dataplex/v1/dataplex_service/operations" -require "google/cloud/dataplex/v1/dataplex_service/client" -require "google/cloud/dataplex/v1/dataplex_service/rest" - -module Google - module Cloud - module Dataplex - module V1 - ## - # Dataplex service provides data lakes as a service. The primary resources - # offered by this service are Lakes, Zones and Assets which collectively allow - # a data administrator to organize, manage, secure and catalog data across - # their organization located across cloud projects in a variety of storage - # systems including Cloud Storage and BigQuery. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/dataplex/v1/dataplex_service" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/dataplex/v1/dataplex_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module DataplexService - end - end - end - end -end - -helper_path = ::File.join __dir__, "dataplex_service", "helpers.rb" -require "google/cloud/dataplex/v1/dataplex_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb deleted file mode 100644 index 7e66861d6007..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +++ /dev/null @@ -1,3366 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - ## - # Client for the DataplexService service. - # - # Dataplex service provides data lakes as a service. The primary resources - # offered by this service are Lakes, Zones and Assets which collectively allow - # a data administrator to organize, manage, secure and catalog data across - # their organization located across cloud projects in a variety of storage - # systems including Cloud Storage and BigQuery. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dataplex_service_stub - - ## - # Configure the DataplexService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataplexService clients - # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_lake.timeout = 60.0 - - default_config.rpcs.update_lake.timeout = 60.0 - - default_config.rpcs.delete_lake.timeout = 60.0 - - default_config.rpcs.list_lakes.timeout = 60.0 - default_config.rpcs.list_lakes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_lake.timeout = 60.0 - default_config.rpcs.get_lake.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_lake_actions.timeout = 60.0 - default_config.rpcs.list_lake_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_zone.timeout = 60.0 - - default_config.rpcs.update_zone.timeout = 60.0 - - default_config.rpcs.delete_zone.timeout = 60.0 - - default_config.rpcs.list_zones.timeout = 60.0 - default_config.rpcs.list_zones.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_zone.timeout = 60.0 - default_config.rpcs.get_zone.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_zone_actions.timeout = 60.0 - default_config.rpcs.list_zone_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_asset.timeout = 60.0 - - default_config.rpcs.update_asset.timeout = 60.0 - - default_config.rpcs.delete_asset.timeout = 60.0 - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_asset.timeout = 60.0 - default_config.rpcs.get_asset.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_asset_actions.timeout = 60.0 - default_config.rpcs.list_asset_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - - default_config.rpcs.update_task.timeout = 60.0 - - default_config.rpcs.delete_task.timeout = 60.0 - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @dataplex_service_stub.universe_domain - end - - ## - # Create a new DataplexService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataplexService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/dataplex/v1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @dataplex_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Dataplex::V1::DataplexService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @dataplex_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - config.logger = @dataplex_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - config.logger = @dataplex_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataplexService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @dataplex_service_stub.logger - end - - # Service calls - - ## - # Creates a lake resource. - # - # @overload create_lake(request, options = nil) - # Pass arguments to `create_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) - # Pass arguments to `create_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the lake location, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param lake_id [::String] - # Required. Lake identifier. - # This ID will be used to generate names such as database and dataset names - # when publishing metadata to Hive Metastore and BigQuery. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique within the customer project / location. - # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Lake resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new - # - # # Call the create_lake method. - # result = client.create_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_lake.metadata.to_h - - # Set x-goog-api-client, 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_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_lake, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a lake resource. - # - # @overload update_lake(request, options = nil) - # Pass arguments to `update_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) - # Pass arguments to `update_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new - # - # # Call the update_lake method. - # result = client.update_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_lake.metadata.to_h - - # Set x-goog-api-client, 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.lake&.name - header_params["lake.name"] = request.lake.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_lake, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a lake resource. All zones within the lake must be deleted before - # the lake can be deleted. - # - # @overload delete_lake(request, options = nil) - # Pass arguments to `delete_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_lake(name: nil) - # Pass arguments to `delete_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new - # - # # Call the delete_lake method. - # result = client.delete_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_lake.metadata.to_h - - # Set x-goog-api-client, 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_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_lake, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists lake resources in a project and location. - # - # @overload list_lakes(request, options = nil) - # Pass arguments to `list_lakes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lakes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the lake location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of Lakes to return. The service may return fewer - # than this value. If unspecified, at most 10 lakes will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListLakes` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListLakes` must match the call that provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new - # - # # Call the list_lakes method. - # result = client.list_lakes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. - # p item - # end - # - def list_lakes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_lakes.metadata.to_h - - # Set x-goog-api-client, 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_lakes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lakes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_lakes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lakes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a lake resource. - # - # @overload get_lake(request, options = nil) - # Pass arguments to `get_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_lake(name: nil) - # Pass arguments to `get_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Lake] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Lake] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new - # - # # Call the get_lake method. - # result = client.get_lake request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. - # p result - # - def get_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_lake.metadata.to_h - - # Set x-goog-api-client, 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_lake.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_lake, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a lake. - # - # @overload list_lake_actions(request, options = nil) - # Pass arguments to `list_lake_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lake_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of actions to return. The service may return fewer - # than this value. If unspecified, at most 10 actions will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListLakeActions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListLakeActions` must match the call that provided - # the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new - # - # # Call the list_lake_actions method. - # result = client.list_lake_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_lake_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_lake_actions.metadata.to_h - - # Set x-goog-api-client, 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_lake_actions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_lake_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_lake_actions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a zone resource within a lake. - # - # @overload create_zone(request, options = nil) - # Pass arguments to `create_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) - # Pass arguments to `create_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param zone_id [::String] - # Required. Zone identifier. - # This ID will be used to generate names such as database and dataset names - # when publishing metadata to Hive Metastore and BigQuery. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique across all lakes from all locations in a project. - # * Must not be one of the reserved IDs (i.e. "default", "global-temp") - # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Zone resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new - # - # # Call the create_zone method. - # result = client.create_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_zone.metadata.to_h - - # Set x-goog-api-client, 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_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_zone, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a zone resource. - # - # @overload update_zone(request, options = nil) - # Pass arguments to `update_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) - # Pass arguments to `update_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new - # - # # Call the update_zone method. - # result = client.update_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_zone.metadata.to_h - - # Set x-goog-api-client, 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.zone&.name - header_params["zone.name"] = request.zone.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_zone, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a zone resource. All assets within a zone must be deleted before - # the zone can be deleted. - # - # @overload delete_zone(request, options = nil) - # Pass arguments to `delete_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_zone(name: nil) - # Pass arguments to `delete_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new - # - # # Call the delete_zone method. - # result = client.delete_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_zone.metadata.to_h - - # Set x-goog-api-client, 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_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_zone, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists zone resources in a lake. - # - # @overload list_zones(request, options = nil) - # Pass arguments to `list_zones` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_zones` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of zones to return. The service may return fewer - # than this value. If unspecified, at most 10 zones will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListZones` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListZones` must match the call that provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new - # - # # Call the list_zones method. - # result = client.list_zones request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. - # p item - # end - # - def list_zones request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_zones.metadata.to_h - - # Set x-goog-api-client, 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_zones.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_zones.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_zones, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zones, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a zone resource. - # - # @overload get_zone(request, options = nil) - # Pass arguments to `get_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_zone(name: nil) - # Pass arguments to `get_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Zone] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Zone] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new - # - # # Call the get_zone method. - # result = client.get_zone request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. - # p result - # - def get_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_zone.metadata.to_h - - # Set x-goog-api-client, 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_zone.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_zone, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a zone. - # - # @overload list_zone_actions(request, options = nil) - # Pass arguments to `list_zone_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_zone_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of actions to return. The service may return fewer - # than this value. If unspecified, at most 10 actions will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListZoneActions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListZoneActions` must match the call that provided - # the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new - # - # # Call the list_zone_actions method. - # result = client.list_zone_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_zone_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_zone_actions.metadata.to_h - - # Set x-goog-api-client, 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_zone_actions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_zone_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_zone_actions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an asset resource. - # - # @overload create_asset(request, options = nil) - # Pass arguments to `create_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) - # Pass arguments to `create_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param asset_id [::String] - # Required. Asset identifier. - # This ID will be used to generate names such as table names when publishing - # metadata to Hive Metastore and BigQuery. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique within the zone. - # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Asset resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new - # - # # Call the create_asset method. - # result = client.create_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_asset.metadata.to_h - - # Set x-goog-api-client, 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_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an asset resource. - # - # @overload update_asset(request, options = nil) - # Pass arguments to `update_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) - # Pass arguments to `update_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new - # - # # Call the update_asset method. - # result = client.update_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_asset.metadata.to_h - - # Set x-goog-api-client, 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.asset&.name - header_params["asset.name"] = request.asset.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an asset resource. The referenced storage resource is detached - # (default) or deleted based on the associated Lifecycle policy. - # - # @overload delete_asset(request, options = nil) - # Pass arguments to `delete_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_asset(name: nil) - # Pass arguments to `delete_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new - # - # # Call the delete_asset method. - # result = client.delete_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_asset.metadata.to_h - - # Set x-goog-api-client, 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_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_asset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists asset resources in a zone. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of asset to return. The service may return fewer - # than this value. If unspecified, at most 10 assets will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListAssets` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListAssets` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, 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_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an asset resource. - # - # @overload get_asset(request, options = nil) - # Pass arguments to `get_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_asset(name: nil) - # Pass arguments to `get_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Asset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Asset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new - # - # # Call the get_asset method. - # result = client.get_asset request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. - # p result - # - def get_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_asset.metadata.to_h - - # Set x-goog-api-client, 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_asset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_asset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in an asset. - # - # @overload list_asset_actions(request, options = nil) - # Pass arguments to `list_asset_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_asset_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of actions to return. The service may return fewer - # than this value. If unspecified, at most 10 actions will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListAssetActions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListAssetActions` must match the call that provided - # the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new - # - # # Call the list_asset_actions method. - # result = client.list_asset_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_asset_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_asset_actions.metadata.to_h - - # Set x-goog-api-client, 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_asset_actions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_asset_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_asset_actions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task resource within a lake. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param task_id [::String] - # Required. Task identifier. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Task resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, 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_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :create_task, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the task resource. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_task(update_mask: nil, task: nil, validate_only: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client, 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.task&.name - header_params["task.name"] = request.task.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :update_task, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the task resource. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, 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_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :delete_task, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tasks under the given lake. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of tasks to return. The service may return fewer - # than this value. If unspecified, at most 10 tasks will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListZones` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListZones` must match the call that provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, 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_tasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_tasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_tasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get task resource. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Task] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Task] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, 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_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Jobs under the given task. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of jobs to return. The service may return fewer - # than this value. If unspecified, at most 10 jobs will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListJobs` call. Provide this - # to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListJobs` must match the call that provided the page - # token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, 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_jobs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :list_jobs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_jobs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run an on demand execution of a Task. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_task(name: nil, labels: nil, args: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param labels [::Hash{::String => ::String}] - # Optional. User-defined labels for the task. If the map is left empty, the - # task will run with existing labels from task definition. If the map - # contains an entry with a new key, the same will be added to existing set of - # labels. If the map contains an entry with an existing label key in task - # definition, the task will run with new label value for that entry. Clearing - # an existing label will require label value to be explicitly set to a hyphen - # "-". The label value cannot be empty. - # @param args [::Hash{::String => ::String}] - # Optional. Execution spec arguments. If the map is left empty, the task will - # run with existing execution spec args from task definition. If the map - # contains an entry with a new key, the same will be added to existing set of - # args. If the map contains an entry with an existing arg key in task - # definition, the task will run with new arg value for that entry. Clearing - # an existing arg will require arg value to be explicitly set to a hyphen - # "-". The arg value cannot be empty. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client, 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.run_task.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :run_task, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get job resource. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Job] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Job] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, 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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :get_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel jobs running for the task resource. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_job(name: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_job.metadata.to_h - - # Set x-goog-api-client, 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_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.call_rpc :cancel_job, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataplexService API. - # - # This class represents the configuration for DataplexService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_lake to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`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::Cloud::Dataplex::V1::DataplexService::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 DataplexService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lake - ## - # RPC-specific configuration for `update_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lake - ## - # RPC-specific configuration for `delete_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lake - ## - # RPC-specific configuration for `list_lakes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lakes - ## - # RPC-specific configuration for `get_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lake - ## - # RPC-specific configuration for `list_lake_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lake_actions - ## - # RPC-specific configuration for `create_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :create_zone - ## - # RPC-specific configuration for `update_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :update_zone - ## - # RPC-specific configuration for `delete_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_zone - ## - # RPC-specific configuration for `list_zones` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zones - ## - # RPC-specific configuration for `get_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :get_zone - ## - # RPC-specific configuration for `list_zone_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zone_actions - ## - # RPC-specific configuration for `create_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_asset - ## - # RPC-specific configuration for `update_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_asset - ## - # RPC-specific configuration for `delete_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_asset - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `get_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_asset - ## - # RPC-specific configuration for `list_asset_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_asset_actions - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - - # @private - def initialize parent_rpcs = nil - create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake - @create_lake = ::Gapic::Config::Method.new create_lake_config - update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake - @update_lake = ::Gapic::Config::Method.new update_lake_config - delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake - @delete_lake = ::Gapic::Config::Method.new delete_lake_config - list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes - @list_lakes = ::Gapic::Config::Method.new list_lakes_config - get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake - @get_lake = ::Gapic::Config::Method.new get_lake_config - list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions - @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config - create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone - @create_zone = ::Gapic::Config::Method.new create_zone_config - update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone - @update_zone = ::Gapic::Config::Method.new update_zone_config - delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone - @delete_zone = ::Gapic::Config::Method.new delete_zone_config - list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones - @list_zones = ::Gapic::Config::Method.new list_zones_config - get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone - @get_zone = ::Gapic::Config::Method.new get_zone_config - list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions - @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config - create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset - @create_asset = ::Gapic::Config::Method.new create_asset_config - update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset - @update_asset = ::Gapic::Config::Method.new update_asset_config - delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset - @delete_asset = ::Gapic::Config::Method.new delete_asset_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset - @get_asset = ::Gapic::Config::Method.new get_asset_config - list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions - @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb deleted file mode 100644 index 77c5a1301f1c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # Credentials for the DataplexService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb deleted file mode 100644 index f00cf4f809df..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# 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 DataplexService - # 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 DataplexService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb deleted file mode 100644 index 115a15d7bce1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb +++ /dev/null @@ -1,157 +0,0 @@ -# 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 - module DataplexService - # Path helper methods for the DataplexService API. - module Paths - ## - # Create a fully-qualified Asset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param asset [String] - # - # @return [::String] - def asset_path project:, location:, lake:, zone:, asset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/assets/#{asset}" - end - - ## - # Create a fully-qualified Job resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param task [String] - # @param job [String] - # - # @return [::String] - def job_path project:, location:, lake:, task:, job: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "task cannot contain /" if task.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}/jobs/#{job}" - end - - ## - # Create a fully-qualified Lake resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # - # @return [::String] - def lake_path project:, location:, lake: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Task resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param task [String] - # - # @return [::String] - def task_path project:, location:, lake:, task: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/tasks/#{task}" - end - - ## - # Create a fully-qualified Zone resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # - # @return [::String] - def zone_path project:, location:, lake:, zone: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb deleted file mode 100644 index 6f379d24b3d8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/dataplex_service/credentials" -require "google/cloud/dataplex/v1/dataplex_service/paths" -require "google/cloud/dataplex/v1/dataplex_service/rest/operations" -require "google/cloud/dataplex/v1/dataplex_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # Dataplex service provides data lakes as a service. The primary resources - # offered by this service are Lakes, Zones and Assets which collectively allow - # a data administrator to organize, manage, secure and catalog data across - # their organization located across cloud projects in a variety of storage - # systems including Cloud Storage and BigQuery. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/dataplex_service/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module DataplexService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/dataplex_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb deleted file mode 100644 index 063252549d7f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +++ /dev/null @@ -1,3143 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/service_pb" -require "google/cloud/dataplex/v1/dataplex_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - module Rest - ## - # REST client for the DataplexService service. - # - # Dataplex service provides data lakes as a service. The primary resources - # offered by this service are Lakes, Zones and Assets which collectively allow - # a data administrator to organize, manage, secure and catalog data across - # their organization located across cloud projects in a variety of storage - # systems including Cloud Storage and BigQuery. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dataplex_service_stub - - ## - # Configure the DataplexService Client class. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataplexService clients - # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_lake.timeout = 60.0 - - default_config.rpcs.update_lake.timeout = 60.0 - - default_config.rpcs.delete_lake.timeout = 60.0 - - default_config.rpcs.list_lakes.timeout = 60.0 - default_config.rpcs.list_lakes.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_lake.timeout = 60.0 - default_config.rpcs.get_lake.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_lake_actions.timeout = 60.0 - default_config.rpcs.list_lake_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_zone.timeout = 60.0 - - default_config.rpcs.update_zone.timeout = 60.0 - - default_config.rpcs.delete_zone.timeout = 60.0 - - default_config.rpcs.list_zones.timeout = 60.0 - default_config.rpcs.list_zones.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_zone.timeout = 60.0 - default_config.rpcs.get_zone.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_zone_actions.timeout = 60.0 - default_config.rpcs.list_zone_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_asset.timeout = 60.0 - - default_config.rpcs.update_asset.timeout = 60.0 - - default_config.rpcs.delete_asset.timeout = 60.0 - - default_config.rpcs.list_assets.timeout = 60.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_asset.timeout = 60.0 - default_config.rpcs.get_asset.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_asset_actions.timeout = 60.0 - default_config.rpcs.list_asset_actions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_task.timeout = 60.0 - - default_config.rpcs.update_task.timeout = 60.0 - - default_config.rpcs.delete_task.timeout = 60.0 - - default_config.rpcs.list_tasks.timeout = 60.0 - default_config.rpcs.list_tasks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_task.timeout = 60.0 - default_config.rpcs.get_task.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_jobs.timeout = 60.0 - default_config.rpcs.list_jobs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_job.timeout = 60.0 - default_config.rpcs.get_job.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.cancel_job.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @dataplex_service_stub.universe_domain - end - - ## - # Create a new DataplexService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataplexService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @dataplex_service_stub = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @dataplex_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @dataplex_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 = @dataplex_service_stub.endpoint - config.universe_domain = @dataplex_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @dataplex_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Dataplex::V1::DataplexService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @dataplex_service_stub.logger - end - - # Service calls - - ## - # Creates a lake resource. - # - # @overload create_lake(request, options = nil) - # Pass arguments to `create_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil) - # Pass arguments to `create_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the lake location, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @param lake_id [::String] - # Required. Lake identifier. - # This ID will be used to generate names such as database and dataset names - # when publishing metadata to Hive Metastore and BigQuery. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique within the customer project / location. - # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Lake resource - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new - # - # # Call the create_lake method. - # result = client.create_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_lake.metadata.to_h - - # Set x-goog-api-client, 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_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_lake request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a lake resource. - # - # @overload update_lake(request, options = nil) - # Pass arguments to `update_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil) - # Pass arguments to `update_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new - # - # # Call the update_lake method. - # result = client.update_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_lake.metadata.to_h - - # Set x-goog-api-client, 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_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_lake request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a lake resource. All zones within the lake must be deleted before - # the lake can be deleted. - # - # @overload delete_lake(request, options = nil) - # Pass arguments to `delete_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_lake(name: nil) - # Pass arguments to `delete_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new - # - # # Call the delete_lake method. - # result = client.delete_lake request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_lake.metadata.to_h - - # Set x-goog-api-client, 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_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_lake request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists lake resources in a project and location. - # - # @overload list_lakes(request, options = nil) - # Pass arguments to `list_lakes` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_lakes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the lake location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. Maximum number of Lakes to return. The service may return fewer - # than this value. If unspecified, at most 10 lakes will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListLakes` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListLakes` must match the call that provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new - # - # # Call the list_lakes method. - # result = client.list_lakes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. - # p item - # end - # - def list_lakes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_lakes.metadata.to_h - - # Set x-goog-api-client, 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_lakes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lakes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_lakes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lakes, "lakes", 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 - - ## - # Retrieves a lake resource. - # - # @overload get_lake(request, options = nil) - # Pass arguments to `get_lake` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_lake(name: nil) - # Pass arguments to `get_lake` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Lake] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new - # - # # Call the get_lake method. - # result = client.get_lake request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Lake. - # p result - # - def get_lake request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_lake.metadata.to_h - - # Set x-goog-api-client, 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_lake.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_lake.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_lake request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a lake. - # - # @overload list_lake_actions(request, options = nil) - # Pass arguments to `list_lake_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_lake_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of actions to return. The service may return fewer - # than this value. If unspecified, at most 10 actions will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListLakeActions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListLakeActions` must match the call that provided - # the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new - # - # # Call the list_lake_actions method. - # result = client.list_lake_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_lake_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_lake_actions.metadata.to_h - - # Set x-goog-api-client, 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_lake_actions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_lake_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_lake_actions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, "actions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a zone resource within a lake. - # - # @overload create_zone(request, options = nil) - # Pass arguments to `create_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil) - # Pass arguments to `create_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param zone_id [::String] - # Required. Zone identifier. - # This ID will be used to generate names such as database and dataset names - # when publishing metadata to Hive Metastore and BigQuery. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique across all lakes from all locations in a project. - # * Must not be one of the reserved IDs (i.e. "default", "global-temp") - # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Zone resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new - # - # # Call the create_zone method. - # result = client.create_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_zone.metadata.to_h - - # Set x-goog-api-client, 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_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_zone request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a zone resource. - # - # @overload update_zone(request, options = nil) - # Pass arguments to `update_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil) - # Pass arguments to `update_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new - # - # # Call the update_zone method. - # result = client.update_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_zone.metadata.to_h - - # Set x-goog-api-client, 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_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_zone request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a zone resource. All assets within a zone must be deleted before - # the zone can be deleted. - # - # @overload delete_zone(request, options = nil) - # Pass arguments to `delete_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_zone(name: nil) - # Pass arguments to `delete_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new - # - # # Call the delete_zone method. - # result = client.delete_zone request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_zone.metadata.to_h - - # Set x-goog-api-client, 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_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_zone request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists zone resources in a lake. - # - # @overload list_zones(request, options = nil) - # Pass arguments to `list_zones` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_zones` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of zones to return. The service may return fewer - # than this value. If unspecified, at most 10 zones will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListZones` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListZones` must match the call that provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new - # - # # Call the list_zones method. - # result = client.list_zones request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. - # p item - # end - # - def list_zones request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_zones.metadata.to_h - - # Set x-goog-api-client, 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_zones.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_zones.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_zones request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zones, "zones", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a zone resource. - # - # @overload get_zone(request, options = nil) - # Pass arguments to `get_zone` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_zone(name: nil) - # Pass arguments to `get_zone` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Zone] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new - # - # # Call the get_zone method. - # result = client.get_zone request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Zone. - # p result - # - def get_zone request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_zone.metadata.to_h - - # Set x-goog-api-client, 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_zone.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_zone.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_zone request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in a zone. - # - # @overload list_zone_actions(request, options = nil) - # Pass arguments to `list_zone_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_zone_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of actions to return. The service may return fewer - # than this value. If unspecified, at most 10 actions will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListZoneActions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListZoneActions` must match the call that provided - # the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new - # - # # Call the list_zone_actions method. - # result = client.list_zone_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_zone_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_zone_actions.metadata.to_h - - # Set x-goog-api-client, 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_zone_actions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_zone_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_zone_actions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, "actions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an asset resource. - # - # @overload create_asset(request, options = nil) - # Pass arguments to `create_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil) - # Pass arguments to `create_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param asset_id [::String] - # Required. Asset identifier. - # This ID will be used to generate names such as table names when publishing - # metadata to Hive Metastore and BigQuery. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique within the zone. - # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Asset resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new - # - # # Call the create_asset method. - # result = client.create_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_asset.metadata.to_h - - # Set x-goog-api-client, 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_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an asset resource. - # - # @overload update_asset(request, options = nil) - # Pass arguments to `update_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil) - # Pass arguments to `update_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new - # - # # Call the update_asset method. - # result = client.update_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_asset.metadata.to_h - - # Set x-goog-api-client, 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_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an asset resource. The referenced storage resource is detached - # (default) or deleted based on the associated Lifecycle policy. - # - # @overload delete_asset(request, options = nil) - # Pass arguments to `delete_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_asset(name: nil) - # Pass arguments to `delete_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new - # - # # Call the delete_asset method. - # result = client.delete_asset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_asset.metadata.to_h - - # Set x-goog-api-client, 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_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_asset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists asset resources in a zone. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of asset to return. The service may return fewer - # than this value. If unspecified, at most 10 assets will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListAssets` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListAssets` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, 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_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_assets, "assets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an asset resource. - # - # @overload get_asset(request, options = nil) - # Pass arguments to `get_asset` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_asset(name: nil) - # Pass arguments to `get_asset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Asset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new - # - # # Call the get_asset method. - # result = client.get_asset request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Asset. - # p result - # - def get_asset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_asset.metadata.to_h - - # Set x-goog-api-client, 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_asset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_asset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_asset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists action resources in an asset. - # - # @overload list_asset_actions(request, options = nil) - # Pass arguments to `list_asset_actions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_asset_actions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of actions to return. The service may return fewer - # than this value. If unspecified, at most 10 actions will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListAssetActions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListAssetActions` must match the call that provided - # the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new - # - # # Call the list_asset_actions method. - # result = client.list_asset_actions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - # p item - # end - # - def list_asset_actions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_asset_actions.metadata.to_h - - # Set x-goog-api-client, 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_asset_actions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_asset_actions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_asset_actions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, "actions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a task resource within a lake. - # - # @overload create_task(request, options = nil) - # Pass arguments to `create_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil) - # Pass arguments to `create_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param task_id [::String] - # Required. Task identifier. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Task resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new - # - # # Call the create_task method. - # result = client.create_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_task.metadata.to_h - - # Set x-goog-api-client, 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_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.create_task request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update the task resource. - # - # @overload update_task(request, options = nil) - # Pass arguments to `update_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_task(update_mask: nil, task: nil, validate_only: nil) - # Pass arguments to `update_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new - # - # # Call the update_task method. - # result = client.update_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_task.metadata.to_h - - # Set x-goog-api-client, 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_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.update_task request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete the task resource. - # - # @overload delete_task(request, options = nil) - # Pass arguments to `delete_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_task(name: nil) - # Pass arguments to `delete_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new - # - # # Call the delete_task method. - # result = client.delete_task request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_task.metadata.to_h - - # Set x-goog-api-client, 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_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.delete_task request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists tasks under the given lake. - # - # @overload list_tasks(request, options = nil) - # Pass arguments to `list_tasks` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_tasks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of tasks to return. The service may return fewer - # than this value. If unspecified, at most 10 tasks will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListZones` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListZones` must match the call that provided the page token. - # @param filter [::String] - # Optional. Filter request. - # @param order_by [::String] - # Optional. Order by fields for the result. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new - # - # # Call the list_tasks method. - # result = client.list_tasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Task. - # p item - # end - # - def list_tasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_tasks.metadata.to_h - - # Set x-goog-api-client, 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_tasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_tasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_tasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_tasks, "tasks", 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 task resource. - # - # @overload get_task(request, options = nil) - # Pass arguments to `get_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_task(name: nil) - # Pass arguments to `get_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Task] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new - # - # # Call the get_task method. - # result = client.get_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Task. - # p result - # - def get_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_task.metadata.to_h - - # Set x-goog-api-client, 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_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Jobs under the given task. - # - # @overload list_jobs(request, options = nil) - # Pass arguments to `list_jobs` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_jobs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_jobs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of jobs to return. The service may return fewer - # than this value. If unspecified, at most 10 jobs will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. Page token received from a previous `ListJobs` call. Provide this - # to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListJobs` must match the call that provided the page - # token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new - # - # # Call the list_jobs method. - # result = client.list_jobs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Job. - # p item - # end - # - def list_jobs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_jobs.metadata.to_h - - # Set x-goog-api-client, 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_jobs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_jobs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.list_jobs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_jobs, "jobs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Run an on demand execution of a Task. - # - # @overload run_task(request, options = nil) - # Pass arguments to `run_task` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::RunTaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_task(name: nil, labels: nil, args: nil) - # Pass arguments to `run_task` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @param labels [::Hash{::String => ::String}] - # Optional. User-defined labels for the task. If the map is left empty, the - # task will run with existing labels from task definition. If the map - # contains an entry with a new key, the same will be added to existing set of - # labels. If the map contains an entry with an existing label key in task - # definition, the task will run with new label value for that entry. Clearing - # an existing label will require label value to be explicitly set to a hyphen - # "-". The label value cannot be empty. - # @param args [::Hash{::String => ::String}] - # Optional. Execution spec arguments. If the map is left empty, the task will - # run with existing execution spec args from task definition. If the map - # contains an entry with a new key, the same will be added to existing set of - # args. If the map contains an entry with an existing arg key in task - # definition, the task will run with new arg value for that entry. Clearing - # an existing arg will require arg value to be explicitly set to a hyphen - # "-". The arg value cannot be empty. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::RunTaskRequest.new - # - # # Call the run_task method. - # result = client.run_task request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. - # p result - # - def run_task request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunTaskRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_task.metadata.to_h - - # Set x-goog-api-client, 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.run_task.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_task.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.run_task request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get job resource. - # - # @overload get_job(request, options = nil) - # Pass arguments to `get_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_job(name: nil) - # Pass arguments to `get_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Job] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetJobRequest.new - # - # # Call the get_job method. - # result = client.get_job request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Job. - # p result - # - def get_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_job.metadata.to_h - - # Set x-goog-api-client, 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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.get_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancel jobs running for the task resource. - # - # @overload cancel_job(request, options = nil) - # Pass arguments to `cancel_job` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_job(name: nil) - # Pass arguments to `cancel_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new - # - # # Call the cancel_job method. - # result = client.cancel_job request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_job.metadata.to_h - - # Set x-goog-api-client, 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_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dataplex_service_stub.cancel_job request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DataplexService REST API. - # - # This class represents the configuration for DataplexService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_lake to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_lake.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # 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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - 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 DataplexService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :create_lake - ## - # RPC-specific configuration for `update_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :update_lake - ## - # RPC-specific configuration for `delete_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_lake - ## - # RPC-specific configuration for `list_lakes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lakes - ## - # RPC-specific configuration for `get_lake` - # @return [::Gapic::Config::Method] - # - attr_reader :get_lake - ## - # RPC-specific configuration for `list_lake_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_lake_actions - ## - # RPC-specific configuration for `create_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :create_zone - ## - # RPC-specific configuration for `update_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :update_zone - ## - # RPC-specific configuration for `delete_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_zone - ## - # RPC-specific configuration for `list_zones` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zones - ## - # RPC-specific configuration for `get_zone` - # @return [::Gapic::Config::Method] - # - attr_reader :get_zone - ## - # RPC-specific configuration for `list_zone_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_zone_actions - ## - # RPC-specific configuration for `create_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_asset - ## - # RPC-specific configuration for `update_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_asset - ## - # RPC-specific configuration for `delete_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_asset - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `get_asset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_asset - ## - # RPC-specific configuration for `list_asset_actions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_asset_actions - ## - # RPC-specific configuration for `create_task` - # @return [::Gapic::Config::Method] - # - attr_reader :create_task - ## - # RPC-specific configuration for `update_task` - # @return [::Gapic::Config::Method] - # - attr_reader :update_task - ## - # RPC-specific configuration for `delete_task` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_task - ## - # RPC-specific configuration for `list_tasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_tasks - ## - # RPC-specific configuration for `get_task` - # @return [::Gapic::Config::Method] - # - attr_reader :get_task - ## - # RPC-specific configuration for `list_jobs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_jobs - ## - # RPC-specific configuration for `run_task` - # @return [::Gapic::Config::Method] - # - attr_reader :run_task - ## - # RPC-specific configuration for `get_job` - # @return [::Gapic::Config::Method] - # - attr_reader :get_job - ## - # RPC-specific configuration for `cancel_job` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_job - - # @private - def initialize parent_rpcs = nil - create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake - @create_lake = ::Gapic::Config::Method.new create_lake_config - update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake - @update_lake = ::Gapic::Config::Method.new update_lake_config - delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake - @delete_lake = ::Gapic::Config::Method.new delete_lake_config - list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes - @list_lakes = ::Gapic::Config::Method.new list_lakes_config - get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake - @get_lake = ::Gapic::Config::Method.new get_lake_config - list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions - @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config - create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone - @create_zone = ::Gapic::Config::Method.new create_zone_config - update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone - @update_zone = ::Gapic::Config::Method.new update_zone_config - delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone - @delete_zone = ::Gapic::Config::Method.new delete_zone_config - list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones - @list_zones = ::Gapic::Config::Method.new list_zones_config - get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone - @get_zone = ::Gapic::Config::Method.new get_zone_config - list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions - @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config - create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset - @create_asset = ::Gapic::Config::Method.new create_asset_config - update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset - @update_asset = ::Gapic::Config::Method.new update_asset_config - delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset - @delete_asset = ::Gapic::Config::Method.new delete_asset_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset - @get_asset = ::Gapic::Config::Method.new get_asset_config - list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions - @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config - create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task - @create_task = ::Gapic::Config::Method.new create_task_config - update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task - @update_task = ::Gapic::Config::Method.new update_task_config - delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task - @delete_task = ::Gapic::Config::Method.new delete_task_config - list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks - @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task - @get_task = ::Gapic::Config::Method.new get_task_config - list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs - @list_jobs = ::Gapic::Config::Method.new list_jobs_config - run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task - @run_task = ::Gapic::Config::Method.new run_task_config - get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job - @get_job = ::Gapic::Config::Method.new get_job_config - cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job - @cancel_job = ::Gapic::Config::Method.new cancel_job_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb deleted file mode 100644 index 20bae9658b48..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +++ /dev/null @@ -1,954 +0,0 @@ -# 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 DataplexService - 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 DataplexService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DataplexService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @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/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb deleted file mode 100644 index 5fc1c42bac92..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +++ /dev/null @@ -1,1738 +0,0 @@ -# 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 "google/cloud/dataplex/v1/service_pb" - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - module Rest - ## - # REST service stub for the DataplexService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_lake", - 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_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_lake", - 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_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_lake", - 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_lakes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListLakesResponse] - # A result object deserialized from the server's reply - def list_lakes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lakes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_lakes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.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_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Lake] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Lake] - # A result object deserialized from the server's reply - def get_lake request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_lake_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_lake", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Lake.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_lake_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # A result object deserialized from the server's reply - def list_lake_actions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_lake_actions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_lake_actions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_zone", - 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_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_zone", - 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_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_zone", - 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_zones REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListZonesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListZonesResponse] - # A result object deserialized from the server's reply - def list_zones request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_zones_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_zones", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.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_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Zone] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Zone] - # A result object deserialized from the server's reply - def get_zone request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_zone_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_zone", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Zone.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_zone_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # A result object deserialized from the server's reply - def list_zone_actions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_zone_actions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_zone_actions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_asset", - 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_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_asset", - 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_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_asset", - 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_assets REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListAssetsResponse] - # A result object deserialized from the server's reply - def list_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.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_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Asset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Asset] - # A result object deserialized from the server's reply - def get_asset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_asset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_asset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Asset.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_asset_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListActionsResponse] - # A result object deserialized from the server's reply - def list_asset_actions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_asset_actions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_asset_actions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_task", - 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_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_task", - 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_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_task", - 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_tasks REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListTasksResponse] - # A result object deserialized from the server's reply - def list_tasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_tasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.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_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Task] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Task] - # A result object deserialized from the server's reply - def get_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Task.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_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListJobsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListJobsResponse] - # A result object deserialized from the server's reply - def list_jobs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_jobs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the run_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::RunTaskResponse] - # A result object deserialized from the server's reply - def run_task request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_task_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_task", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.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_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Job] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Job] - # A result object deserialized from the server's reply - def get_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Job.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_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_job", - 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 create_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/lakes", - body: "lake", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{lake.name}", - body: "lake", - matches: [ - ["lake.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lakes REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_lakes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/lakes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_lake REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetLakeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_lake_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_lake_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_lake_actions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/actions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/zones", - body: "zone", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{zone.name}", - body: "zone", - matches: [ - ["zone.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_zones REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZonesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_zones_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/zones", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_zone REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetZoneRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_zone_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_zone_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_zone_actions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/actions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets", - body: "asset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{asset.name}", - body: "asset", - matches: [ - ["asset.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assets REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_asset REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetAssetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_asset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_asset_actions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_asset_actions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/actions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/tasks", - body: "task", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{task.name}", - body: "task", - matches: [ - ["task.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_tasks REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListTasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_tasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/tasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_jobs REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListJobsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_jobs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/jobs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_task REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::RunTaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_task_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_job REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CancelJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb deleted file mode 100644 index 4fddfe4d3194..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_common_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/datascans_common.proto - -require 'google/protobuf' - -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\"\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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - DataScanCatalogPublishingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanCatalogPublishingStatus").msgclass - DataScanCatalogPublishingStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanCatalogPublishingStatus.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb deleted file mode 100644 index c9f845f1de96..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/datascans.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/data_discovery_pb' -require 'google/cloud/dataplex/v1/data_documentation_pb' -require 'google/cloud/dataplex/v1/data_profile_pb' -require 'google/cloud/dataplex/v1/data_quality_pb' -require 'google/cloud/dataplex/v1/processing_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/cloud/dataplex/v1/service_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/dataplex/v1/datascans.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - CreateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateDataScanRequest").msgclass - UpdateDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateDataScanRequest").msgclass - DeleteDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteDataScanRequest").msgclass - GetDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest").msgclass - GetDataScanRequest::DataScanView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanRequest.DataScanView").enummodule - ListDataScansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansRequest").msgclass - ListDataScansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScansResponse").msgclass - RunDataScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanRequest").msgclass - RunDataScanResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunDataScanResponse").msgclass - GetDataScanJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest").msgclass - GetDataScanJobRequest::DataScanJobView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView").enummodule - ListDataScanJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsRequest").msgclass - ListDataScanJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListDataScanJobsResponse").msgclass - GenerateDataQualityRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesRequest").msgclass - GenerateDataQualityRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GenerateDataQualityRulesResponse").msgclass - DataScan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan").msgclass - DataScan::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionSpec").msgclass - DataScan::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScan.ExecutionStatus").msgclass - DataScanJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob").msgclass - DataScanJob::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanJob.State").enummodule - DataScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb deleted file mode 100644 index bacd883e15ed..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/datascans_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/datascans.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 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/datascans_pb' - -module Google - module Cloud - module Dataplex - module V1 - module DataScanService - # DataScanService manages DataScan resources which can be configured to run - # various types of data scanning workload and generate enriched metadata (e.g. - # Data Profile, Data Quality) for the data source. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.DataScanService' - - # Creates a DataScan resource. - rpc :CreateDataScan, ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Google::Longrunning::Operation - # Updates a DataScan resource. - rpc :UpdateDataScan, ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Google::Longrunning::Operation - # Deletes a DataScan resource. - rpc :DeleteDataScan, ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Google::Longrunning::Operation - # Gets a DataScan resource. - rpc :GetDataScan, ::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Google::Cloud::Dataplex::V1::DataScan - # Lists DataScans. - rpc :ListDataScans, ::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Google::Cloud::Dataplex::V1::ListDataScansResponse - # Runs an on-demand execution of a DataScan - rpc :RunDataScan, ::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Google::Cloud::Dataplex::V1::RunDataScanResponse - # Gets a DataScanJob resource. - rpc :GetDataScanJob, ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Google::Cloud::Dataplex::V1::DataScanJob - # Lists DataScanJobs under the given DataScan. - rpc :ListDataScanJobs, ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse - # Generates recommended data quality rules based on the results of a data - # profiling scan. - # - # Use the recommendations to build rules for a data quality scan. - rpc :GenerateDataQualityRules, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb deleted file mode 100644 index cc016a4c438b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/logs_pb.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/logs.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/datascans_common_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n#google/cloud/dataplex/v1/logs.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - DiscoveryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent").msgclass - DiscoveryEvent::ConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails").msgclass - DiscoveryEvent::EntityDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails").msgclass - DiscoveryEvent::TableDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.TableDetails").msgclass - DiscoveryEvent::PartitionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails").msgclass - DiscoveryEvent::ActionDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails").msgclass - DiscoveryEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EventType").enummodule - DiscoveryEvent::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.EntityType").enummodule - DiscoveryEvent::TableType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DiscoveryEvent.TableType").enummodule - JobEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent").msgclass - JobEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Type").enummodule - JobEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.State").enummodule - JobEvent::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.Service").enummodule - JobEvent::ExecutionTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.JobEvent.ExecutionTrigger").enummodule - SessionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent").msgclass - SessionEvent::QueryDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail").msgclass - SessionEvent::QueryDetail::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine").enummodule - SessionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.SessionEvent.EventType").enummodule - GovernanceEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent").msgclass - GovernanceEvent::Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity").msgclass - GovernanceEvent::Entity::EntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType").enummodule - GovernanceEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GovernanceEvent.EventType").enummodule - DataScanEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent").msgclass - DataScanEvent::DataProfileResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileResult").msgclass - DataScanEvent::DataQualityResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityResult").msgclass - DataScanEvent::DataProfileAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs").msgclass - DataScanEvent::DataQualityAppliedConfigs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs").msgclass - DataScanEvent::PostScanActionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult").msgclass - DataScanEvent::PostScanActionsResult::BigQueryExportResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult").msgclass - DataScanEvent::PostScanActionsResult::BigQueryExportResult::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State").enummodule - DataScanEvent::ScanType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.ScanType").enummodule - DataScanEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.State").enummodule - DataScanEvent::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Trigger").enummodule - DataScanEvent::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataScanEvent.Scope").enummodule - DataQualityScanRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult").msgclass - DataQualityScanRuleResult::RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType").enummodule - DataQualityScanRuleResult::EvaluationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType").enummodule - DataQualityScanRuleResult::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataQualityScanRuleResult.Result").enummodule - BusinessGlossaryEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.BusinessGlossaryEvent").msgclass - BusinessGlossaryEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.BusinessGlossaryEvent.EventType").enummodule - EntryLinkEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryLinkEvent").msgclass - EntryLinkEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.EntryLinkEvent.EventType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb deleted file mode 100644 index 489cd0102535..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_pb.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/metadata.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/dataplex/v1/metadata.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e\x01\n\x13\x43reateEntityRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x35\n\x06\x65ntity\x18\x03 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13UpdateEntityRequest\x12\x35\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .google.cloud.dataplex.v1.EntityB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"^\n\x13\x44\x65leteEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xa3\x02\n\x13ListEntitiesRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12K\n\x04view\x18\x02 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.ListEntitiesRequest.EntityViewB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"C\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\n\n\x06TABLES\x10\x01\x12\x0c\n\x08\x46ILESETS\x10\x02\"c\n\x14ListEntitiesResponse\x12\x32\n\x08\x65ntities\x18\x01 \x03(\x0b\x32 .google.cloud.dataplex.v1.Entity\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xde\x01\n\x10GetEntityRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12H\n\x04view\x18\x02 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.GetEntityRequest.EntityViewB\x03\xe0\x41\x01\"J\n\nEntityView\x12\x1b\n\x17\x45NTITY_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x08\n\x04\x46ULL\x10\x04\"\x95\x01\n\x15ListPartitionsRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa9\x01\n\x16\x43reatePartitionRequest\x12\x36\n\x06parent\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12;\n\tpartition\x18\x03 \x01(\x0b\x32#.google.cloud.dataplex.v1.PartitionB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"f\n\x16\x44\x65letePartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x13\n\x04\x65tag\x18\x02 \x01(\tB\x05\x18\x01\xe0\x41\x01\"j\n\x16ListPartitionsResponse\x12\x37\n\npartitions\x18\x01 \x03(\x0b\x32#.google.cloud.dataplex.v1.Partition\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x13GetPartitionRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataplex.googleapis.com/Partition\"\xc9\t\n\x06\x45ntity\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Entity\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12;\n\x04type\x18\n \x01(\x0e\x32%.google.cloud.dataplex.v1.Entity.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x15\n\x05\x61sset\x18\x0b \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x19\n\tdata_path\x18\x0c \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11\x64\x61ta_path_pattern\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rcatalog_entry\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12?\n\x06system\x18\x0f \x01(\x0e\x32\'.google.cloud.dataplex.v1.StorageSystemB\x06\xe0\x41\x02\xe0\x41\x05\x12<\n\x06\x66ormat\x18\x10 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageFormatB\x03\xe0\x41\x02\x12P\n\rcompatibility\x18\x13 \x01(\x0b\x32\x34.google.cloud.dataplex.v1.Entity.CompatibilityStatusB\x03\xe0\x41\x03\x12<\n\x06\x61\x63\x63\x65ss\x18\x15 \x01(\x0b\x32\'.google.cloud.dataplex.v1.StorageAccessB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x06schema\x18\x32 \x01(\x0b\x32 .google.cloud.dataplex.v1.SchemaB\x03\xe0\x41\x02\x1a\x90\x02\n\x13\x43ompatibilityStatus\x12_\n\x0ehive_metastore\x18\x01 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x12Y\n\x08\x62igquery\x18\x02 \x01(\x0b\x32\x42.google.cloud.dataplex.v1.Entity.CompatibilityStatus.CompatibilityB\x03\xe0\x41\x03\x1a=\n\rCompatibility\x12\x17\n\ncompatible\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06reason\x18\x02 \x01(\tB\x03\xe0\x41\x03\"4\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x0b\n\x07\x46ILESET\x10\x02:x\xea\x41u\n\x1e\x64\x61taplex.googleapis.com/Entity\x12Sprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}\"\xa1\x02\n\tPartition\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!dataplex.googleapis.com/Partition\x12\x16\n\x06values\x18\x02 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x18\n\x08location\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x13\n\x04\x65tag\x18\x04 \x01(\tB\x05\x18\x01\xe0\x41\x01:\x93\x01\xea\x41\x8f\x01\n!dataplex.googleapis.com/Partition\x12jprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}\"\xb7\x07\n\x06Schema\x12\x19\n\x0cuser_managed\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\x02 \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x12N\n\x10partition_fields\x18\x03 \x03(\x0b\x32/.google.cloud.dataplex.v1.Schema.PartitionFieldB\x03\xe0\x41\x01\x12M\n\x0fpartition_style\x18\x04 \x01(\x0e\x32/.google.cloud.dataplex.v1.Schema.PartitionStyleB\x03\xe0\x41\x01\x1a\xf1\x01\n\x0bSchemaField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x04type\x18\x03 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x03\xe0\x41\x02\x12\x38\n\x04mode\x18\x04 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.ModeB\x03\xe0\x41\x02\x12\x41\n\x06\x66ields\x18\n \x03(\x0b\x32,.google.cloud.dataplex.v1.Schema.SchemaFieldB\x03\xe0\x41\x01\x1a`\n\x0ePartitionField\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x04type\x18\x02 \x01(\x0e\x32%.google.cloud.dataplex.v1.Schema.TypeB\x06\xe0\x41\x02\xe0\x41\x05\"\xc9\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x42OOLEAN\x10\x01\x12\x08\n\x04\x42YTE\x10\x02\x12\t\n\x05INT16\x10\x03\x12\t\n\x05INT32\x10\x04\x12\t\n\x05INT64\x10\x05\x12\t\n\x05\x46LOAT\x10\x06\x12\n\n\x06\x44OUBLE\x10\x07\x12\x0b\n\x07\x44\x45\x43IMAL\x10\x08\x12\n\n\x06STRING\x10\t\x12\n\n\x06\x42INARY\x10\n\x12\r\n\tTIMESTAMP\x10\x0b\x12\x08\n\x04\x44\x41TE\x10\x0c\x12\x08\n\x04TIME\x10\r\x12\n\n\x06RECORD\x10\x0e\x12\x08\n\x04NULL\x10\x64\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08REQUIRED\x10\x01\x12\x0c\n\x08NULLABLE\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\"F\n\x0ePartitionStyle\x12\x1f\n\x1bPARTITION_STYLE_UNSPECIFIED\x10\x00\x12\x13\n\x0fHIVE_COMPATIBLE\x10\x01\"\xf4\x06\n\rStorageFormat\x12\x43\n\x06\x66ormat\x18\x01 \x01(\x0e\x32..google.cloud.dataplex.v1.StorageFormat.FormatB\x03\xe0\x41\x03\x12Z\n\x12\x63ompression_format\x18\x02 \x01(\x0e\x32\x39.google.cloud.dataplex.v1.StorageFormat.CompressionFormatB\x03\xe0\x41\x01\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x03\x63sv\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.StorageFormat.CsvOptionsB\x03\xe0\x41\x01H\x00\x12H\n\x04json\x18\x0b \x01(\x0b\x32\x33.google.cloud.dataplex.v1.StorageFormat.JsonOptionsB\x03\xe0\x41\x01H\x00\x12N\n\x07iceberg\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataplex.v1.StorageFormat.IcebergOptionsB\x03\xe0\x41\x01H\x00\x1ai\n\nCsvOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bheader_rows\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05quote\x18\x04 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x30\n\x0eIcebergOptions\x12\x1e\n\x11metadata_location\x18\x01 \x01(\tB\x03\xe0\x41\x01\"\xab\x01\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07PARQUET\x10\x01\x12\x08\n\x04\x41VRO\x10\x02\x12\x07\n\x03ORC\x10\x03\x12\x07\n\x03\x43SV\x10\x64\x12\x08\n\x04JSON\x10\x65\x12\n\n\x05IMAGE\x10\xc8\x01\x12\n\n\x05\x41UDIO\x10\xc9\x01\x12\n\n\x05VIDEO\x10\xca\x01\x12\t\n\x04TEXT\x10\xcb\x01\x12\r\n\x08TFRECORD\x10\xcc\x01\x12\n\n\x05OTHER\x10\xe8\x07\x12\x0c\n\x07UNKNOWN\x10\xe9\x07\"L\n\x11\x43ompressionFormat\x12\"\n\x1e\x43OMPRESSION_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04GZIP\x10\x02\x12\t\n\x05\x42ZIP2\x10\x03\x42\t\n\x07options\"\x9a\x01\n\rStorageAccess\x12\x45\n\x04read\x18\x15 \x01(\x0e\x32\x32.google.cloud.dataplex.v1.StorageAccess.AccessModeB\x03\xe0\x41\x03\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02*P\n\rStorageSystem\x12\x1e\n\x1aSTORAGE_SYSTEM_UNSPECIFIED\x10\x00\x12\x11\n\rCLOUD_STORAGE\x10\x01\x12\x0c\n\x08\x42IGQUERY\x10\x02\x32\x89\x0e\n\x0fMetadataService\x12\xbd\x01\n\x0c\x43reateEntity\x12-.google.cloud.dataplex.v1.CreateEntityRequest\x1a .google.cloud.dataplex.v1.Entity\"\\\xda\x41\rparent,entity\x82\xd3\xe4\x93\x02\x46\"*\x12\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a metadata entity. Only supports full resource update. - # - # @overload update_entity(request, options = nil) - # Pass arguments to `update_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_entity(entity: nil, validate_only: nil) - # Pass arguments to `update_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] - # Required. Update description. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new - # - # # Call the update_entity method. - # result = client.update_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def update_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_entity.metadata.to_h - - # Set x-goog-api-client, 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.entity&.name - header_params["entity.name"] = request.entity.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :update_entity, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata entity. - # - # @overload delete_entity(request, options = nil) - # Pass arguments to `delete_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_entity(name: nil, etag: nil) - # Pass arguments to `delete_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param etag [::String] - # Required. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new - # - # # Call the delete_entity method. - # result = client.delete_entity request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_entity.metadata.to_h - - # Set x-goog-api-client, 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_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :delete_entity, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata entity. - # - # @overload get_entity(request, options = nil) - # Pass arguments to `get_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entity(name: nil, view: nil) - # Pass arguments to `get_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] - # Optional. Used to select the subset of entity information to return. - # Defaults to `BASIC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new - # - # # Call the get_entity method. - # result = client.get_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def get_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entity.metadata.to_h - - # Set x-goog-api-client, 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_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :get_entity, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata entities in a zone. - # - # @overload list_entities(request, options = nil) - # Pass arguments to `list_entities` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] - # Required. Specify the entity view to make a partial list request. - # @param page_size [::Integer] - # Optional. Maximum number of entities to return. The service may return - # fewer than this value. If unspecified, 100 entities will be returned by - # default. The maximum value is 500; larger values will will be truncated to - # 500. - # @param page_token [::String] - # Optional. Page token received from a previous `ListEntities` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListEntities` must match the call that provided the - # page token. - # @param filter [::String] - # Optional. The following filter parameters can be added to the URL to limit - # the entities returned by the API: - # - # - Entity ID: ?filter="id=entityID" - # - Asset ID: ?filter="asset=assetID" - # - Data path ?filter="data_path=gs://my-bucket" - # - Is HIVE compatible: ?filter="hive_compatible=true" - # - Is BigQuery compatible: ?filter="bigquery_compatible=true" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new - # - # # Call the list_entities method. - # result = client.list_entities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. - # p item - # end - # - def list_entities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entities.metadata.to_h - - # Set x-goog-api-client, 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_entities.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :list_entities, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_entities, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a metadata partition. - # - # @overload create_partition(request, options = nil) - # Pass arguments to `create_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_partition(parent: nil, partition: nil, validate_only: nil) - # Pass arguments to `create_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] - # Required. Partition resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new - # - # # Call the create_partition method. - # result = client.create_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def create_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_partition.metadata.to_h - - # Set x-goog-api-client, 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_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :create_partition, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata partition. - # - # @overload delete_partition(request, options = nil) - # Pass arguments to `delete_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_partition(name: nil, etag: nil) - # Pass arguments to `delete_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the partition. - # format: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - # The \\{partition_value_path} segment consists of an ordered sequence of - # partition values separated by "/". All values must be provided. - # @param etag [::String] - # Optional. The etag associated with the partition. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new - # - # # Call the delete_partition method. - # result = client.delete_partition request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_partition.metadata.to_h - - # Set x-goog-api-client, 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_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :delete_partition, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata partition of an entity. - # - # @overload get_partition(request, options = nil) - # Pass arguments to `get_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_partition(name: nil) - # Pass arguments to `get_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the partition: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - # The \\{partition_value_path} segment consists of an ordered sequence of - # partition values separated by "/". All values must be provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new - # - # # Call the get_partition method. - # result = client.get_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def get_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_partition.metadata.to_h - - # Set x-goog-api-client, 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_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :get_partition, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata partitions of an entity. - # - # @overload list_partitions(request, options = nil) - # Pass arguments to `list_partitions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_partitions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of partitions to return. The service may return - # fewer than this value. If unspecified, 100 partitions will be returned by - # default. The maximum page size is 500; larger values will will be truncated - # to 500. - # @param page_token [::String] - # Optional. Page token received from a previous `ListPartitions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListPartitions` must match the call that provided - # the page token. - # @param filter [::String] - # Optional. Filter the partitions returned to the caller using a key value - # pair expression. Supported operators and syntax: - # - # - logic operators: AND, OR - # - comparison operators: <, >, >=, <= ,=, != - # - LIKE operators: - # - The right hand of a LIKE operator supports "." and - # "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - # - parenthetical grouping: ( ) - # - # Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - # - # **Notes:** - # - # - Keys to the left of operators are case insensitive. - # - Partition results are sorted first by creation time, then by - # lexicographic order. - # - Up to 20 key value filter pairs are allowed, but due to performance - # considerations, only the first 10 will be used as a filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new - # - # # Call the list_partitions method. - # result = client.list_partitions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. - # p item - # end - # - def list_partitions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_partitions.metadata.to_h - - # Set x-goog-api-client, 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_partitions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_partitions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.call_rpc :list_partitions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @metadata_service_stub, :list_partitions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MetadataService API. - # - # This class represents the configuration for MetadataService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::MetadataService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`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::Cloud::Dataplex::V1::MetadataService::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 MetadataService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entity - ## - # RPC-specific configuration for `update_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entity - ## - # RPC-specific configuration for `delete_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entity - ## - # RPC-specific configuration for `get_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entity - ## - # RPC-specific configuration for `list_entities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entities - ## - # RPC-specific configuration for `create_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :create_partition - ## - # RPC-specific configuration for `delete_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_partition - ## - # RPC-specific configuration for `get_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partition - ## - # RPC-specific configuration for `list_partitions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_partitions - - # @private - def initialize parent_rpcs = nil - create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity - @create_entity = ::Gapic::Config::Method.new create_entity_config - update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity - @update_entity = ::Gapic::Config::Method.new update_entity_config - delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity - @delete_entity = ::Gapic::Config::Method.new delete_entity_config - get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity - @get_entity = ::Gapic::Config::Method.new get_entity_config - list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities - @list_entities = ::Gapic::Config::Method.new list_entities_config - create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition - @create_partition = ::Gapic::Config::Method.new create_partition_config - delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition - @delete_partition = ::Gapic::Config::Method.new delete_partition_config - get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition - @get_partition = ::Gapic::Config::Method.new get_partition_config - list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions - @list_partitions = ::Gapic::Config::Method.new list_partitions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb deleted file mode 100644 index 5f6f3c3f0b6b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 "googleauth" - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - # Credentials for the MetadataService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb deleted file mode 100644 index 48d9b8647b14..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/paths.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 - module MetadataService - # Path helper methods for the MetadataService API. - module Paths - ## - # Create a fully-qualified Entity resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param entity [String] - # - # @return [::String] - def entity_path project:, location:, lake:, zone:, entity: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}" - end - - ## - # Create a fully-qualified Partition resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # @param entity [String] - # @param partition [String] - # - # @return [::String] - def partition_path project:, location:, lake:, zone:, entity:, partition: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" - raise ::ArgumentError, "entity cannot contain /" if entity.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}/entities/#{entity}/partitions/#{partition}" - end - - ## - # Create a fully-qualified Zone resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}` - # - # @param project [String] - # @param location [String] - # @param lake [String] - # @param zone [String] - # - # @return [::String] - def zone_path project:, location:, lake:, zone: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "lake cannot contain /" if lake.to_s.include? "/" - - "projects/#{project}/locations/#{location}/lakes/#{lake}/zones/#{zone}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb deleted file mode 100644 index 1e84f7f6a1fe..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/dataplex/v1/version" -require "google/cloud/dataplex/v1/bindings_override" - -require "google/cloud/dataplex/v1/metadata_service/credentials" -require "google/cloud/dataplex/v1/metadata_service/paths" -require "google/cloud/dataplex/v1/metadata_service/rest/client" - -module Google - module Cloud - module Dataplex - module V1 - ## - # Metadata service manages metadata resources such as tables, filesets and - # partitions. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/dataplex/v1/metadata_service/rest" - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - module MetadataService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/dataplex/v1/metadata_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb deleted file mode 100644 index a5187f5590e6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +++ /dev/null @@ -1,1273 +0,0 @@ -# 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 "google/cloud/errors" -require "google/cloud/dataplex/v1/metadata_pb" -require "google/cloud/dataplex/v1/metadata_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - module Rest - ## - # REST client for the MetadataService service. - # - # Metadata service manages metadata resources such as tables, filesets and - # partitions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "dataplex.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :metadata_service_stub - - ## - # Configure the MetadataService Client class. - # - # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MetadataService clients - # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Dataplex", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_entity.timeout = 60.0 - - default_config.rpcs.update_entity.timeout = 60.0 - - default_config.rpcs.delete_entity.timeout = 60.0 - - default_config.rpcs.get_entity.timeout = 60.0 - default_config.rpcs.get_entity.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_entities.timeout = 60.0 - default_config.rpcs.list_entities.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_partition.timeout = 60.0 - - default_config.rpcs.delete_partition.timeout = 60.0 - - default_config.rpcs.get_partition.timeout = 60.0 - default_config.rpcs.get_partition.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_partitions.timeout = 60.0 - default_config.rpcs.list_partitions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the MetadataService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @metadata_service_stub.universe_domain - end - - ## - # Create a new MetadataService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MetadataService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @metadata_service_stub = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @metadata_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @metadata_service_stub.endpoint - config.universe_domain = @metadata_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @metadata_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 = @metadata_service_stub.endpoint - config.universe_domain = @metadata_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @metadata_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @metadata_service_stub.logger - end - - # Service calls - - ## - # Create a metadata entity. - # - # @overload create_entity(request, options = nil) - # Pass arguments to `create_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreateEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entity(parent: nil, entity: nil, validate_only: nil) - # Pass arguments to `create_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] - # Required. Entity resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new - # - # # Call the create_entity method. - # result = client.create_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def create_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entity.metadata.to_h - - # Set x-goog-api-client, 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_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.create_entity request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a metadata entity. Only supports full resource update. - # - # @overload update_entity(request, options = nil) - # Pass arguments to `update_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_entity(entity: nil, validate_only: nil) - # Pass arguments to `update_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash] - # Required. Update description. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new - # - # # Call the update_entity method. - # result = client.update_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def update_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_entity.metadata.to_h - - # Set x-goog-api-client, 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_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.update_entity request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata entity. - # - # @overload delete_entity(request, options = nil) - # Pass arguments to `delete_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_entity(name: nil, etag: nil) - # Pass arguments to `delete_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param etag [::String] - # Required. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new - # - # # Call the delete_entity method. - # result = client.delete_entity request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_entity.metadata.to_h - - # Set x-goog-api-client, 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_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.delete_entity request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata entity. - # - # @overload get_entity(request, options = nil) - # Pass arguments to `get_entity` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entity(name: nil, view: nil) - # Pass arguments to `get_entity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - # @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] - # Optional. Used to select the subset of entity information to return. - # Defaults to `BASIC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetEntityRequest.new - # - # # Call the get_entity method. - # result = client.get_entity request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - # p result - # - def get_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entity.metadata.to_h - - # Set x-goog-api-client, 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_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.get_entity request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata entities in a zone. - # - # @overload list_entities(request, options = nil) - # Pass arguments to `list_entities` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] - # Required. Specify the entity view to make a partial list request. - # @param page_size [::Integer] - # Optional. Maximum number of entities to return. The service may return - # fewer than this value. If unspecified, 100 entities will be returned by - # default. The maximum value is 500; larger values will will be truncated to - # 500. - # @param page_token [::String] - # Optional. Page token received from a previous `ListEntities` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListEntities` must match the call that provided the - # page token. - # @param filter [::String] - # Optional. The following filter parameters can be added to the URL to limit - # the entities returned by the API: - # - # - Entity ID: ?filter="id=entityID" - # - Asset ID: ?filter="asset=assetID" - # - Data path ?filter="data_path=gs://my-bucket" - # - Is HIVE compatible: ?filter="hive_compatible=true" - # - Is BigQuery compatible: ?filter="bigquery_compatible=true" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new - # - # # Call the list_entities method. - # result = client.list_entities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. - # p item - # end - # - def list_entities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entities.metadata.to_h - - # Set x-goog-api-client, 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_entities.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.list_entities request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_entities, "entities", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a metadata partition. - # - # @overload create_partition(request, options = nil) - # Pass arguments to `create_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_partition(parent: nil, partition: nil, validate_only: nil) - # Pass arguments to `create_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash] - # Required. Partition resource. - # @param validate_only [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new - # - # # Call the create_partition method. - # result = client.create_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def create_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_partition.metadata.to_h - - # Set x-goog-api-client, 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_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.create_partition request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a metadata partition. - # - # @overload delete_partition(request, options = nil) - # Pass arguments to `delete_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_partition(name: nil, etag: nil) - # Pass arguments to `delete_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the partition. - # format: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - # The \\{partition_value_path} segment consists of an ordered sequence of - # partition values separated by "/". All values must be provided. - # @param etag [::String] - # Optional. The etag associated with the partition. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new - # - # # Call the delete_partition method. - # result = client.delete_partition request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_partition.metadata.to_h - - # Set x-goog-api-client, 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_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.delete_partition request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a metadata partition of an entity. - # - # @overload get_partition(request, options = nil) - # Pass arguments to `get_partition` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_partition(name: nil) - # Pass arguments to `get_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the partition: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - # The \\{partition_value_path} segment consists of an ordered sequence of - # partition values separated by "/". All values must be provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new - # - # # Call the get_partition method. - # result = client.get_partition request - # - # # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - # p result - # - def get_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_partition.metadata.to_h - - # Set x-goog-api-client, 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_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.get_partition request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List metadata partitions of an entity. - # - # @overload list_partitions(request, options = nil) - # Pass arguments to `list_partitions` via a request object, either of type - # {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_partitions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @param page_size [::Integer] - # Optional. Maximum number of partitions to return. The service may return - # fewer than this value. If unspecified, 100 partitions will be returned by - # default. The maximum page size is 500; larger values will will be truncated - # to 500. - # @param page_token [::String] - # Optional. Page token received from a previous `ListPartitions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListPartitions` must match the call that provided - # the page token. - # @param filter [::String] - # Optional. Filter the partitions returned to the caller using a key value - # pair expression. Supported operators and syntax: - # - # - logic operators: AND, OR - # - comparison operators: <, >, >=, <= ,=, != - # - LIKE operators: - # - The right hand of a LIKE operator supports "." and - # "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - # - parenthetical grouping: ( ) - # - # Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - # - # **Notes:** - # - # - Keys to the left of operators are case insensitive. - # - Partition results are sorted first by creation time, then by - # lexicographic order. - # - Up to 20 key value filter pairs are allowed, but due to performance - # considerations, only the first 10 will be used as a filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/dataplex/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new - # - # # Call the list_partitions method. - # result = client.list_partitions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. - # p item - # end - # - def list_partitions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_partitions.metadata.to_h - - # Set x-goog-api-client, 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_partitions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_partitions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @metadata_service_stub.list_partitions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_partitions, "partitions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MetadataService REST API. - # - # This class represents the configuration for MetadataService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_entity to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_entity.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # 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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - 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 MetadataService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entity - ## - # RPC-specific configuration for `update_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :update_entity - ## - # RPC-specific configuration for `delete_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_entity - ## - # RPC-specific configuration for `get_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entity - ## - # RPC-specific configuration for `list_entities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entities - ## - # RPC-specific configuration for `create_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :create_partition - ## - # RPC-specific configuration for `delete_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_partition - ## - # RPC-specific configuration for `get_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partition - ## - # RPC-specific configuration for `list_partitions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_partitions - - # @private - def initialize parent_rpcs = nil - create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity - @create_entity = ::Gapic::Config::Method.new create_entity_config - update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity - @update_entity = ::Gapic::Config::Method.new update_entity_config - delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity - @delete_entity = ::Gapic::Config::Method.new delete_entity_config - get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity - @get_entity = ::Gapic::Config::Method.new get_entity_config - list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities - @list_entities = ::Gapic::Config::Method.new list_entities_config - create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition - @create_partition = ::Gapic::Config::Method.new create_partition_config - delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition - @delete_partition = ::Gapic::Config::Method.new delete_partition_config - get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition - @get_partition = ::Gapic::Config::Method.new get_partition_config - list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions - @list_partitions = ::Gapic::Config::Method.new list_partitions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb deleted file mode 100644 index 24849b77f593..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +++ /dev/null @@ -1,633 +0,0 @@ -# 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 "google/cloud/dataplex/v1/metadata_pb" - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - module Rest - ## - # REST service stub for the MetadataService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # A result object deserialized from the server's reply - def create_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_entity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entity.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_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # A result object deserialized from the server's reply - def update_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_entity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entity.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_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_entity", - 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 get_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Entity] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Entity] - # A result object deserialized from the server's reply - def get_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_entity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Entity.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_entities REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListEntitiesResponse] - # A result object deserialized from the server's reply - def list_entities request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entities_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_entities", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # A result object deserialized from the server's reply - def create_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_partition", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Partition.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_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_partition", - 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 get_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::Partition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::Partition] - # A result object deserialized from the server's reply - def get_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_partition", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::Partition.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_partitions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Dataplex::V1::ListPartitionsResponse] - # A result object deserialized from the server's reply - def list_partitions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_partitions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_partitions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.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 create_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreateEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entities", - body: "entity", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::UpdateEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{entity.name}", - body: "entity", - matches: [ - ["entity.name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeleteEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entity REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entities REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListEntitiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entities_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entities", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::CreatePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/partitions", - body: "partition", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::DeletePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_partition REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::GetPartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/partitions(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_partitions REST call - # - # @param request_pb [::Google::Cloud::Dataplex::V1::ListPartitionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_partitions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/partitions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/entities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb deleted file mode 100644 index 33b2f279f03a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/metadata_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/metadata.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 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/metadata_pb' - -module Google - module Cloud - module Dataplex - module V1 - module MetadataService - # Metadata service manages metadata resources such as tables, filesets and - # partitions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.MetadataService' - - # Create a metadata entity. - rpc :CreateEntity, ::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity - # Update a metadata entity. Only supports full resource update. - rpc :UpdateEntity, ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity - # Delete a metadata entity. - rpc :DeleteEntity, ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Google::Protobuf::Empty - # Get a metadata entity. - rpc :GetEntity, ::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Google::Cloud::Dataplex::V1::Entity - # List metadata entities in a zone. - rpc :ListEntities, ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Google::Cloud::Dataplex::V1::ListEntitiesResponse - # Create a metadata partition. - rpc :CreatePartition, ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Google::Cloud::Dataplex::V1::Partition - # Delete a metadata partition. - rpc :DeletePartition, ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Google::Protobuf::Empty - # Get a metadata partition of an entity. - rpc :GetPartition, ::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Google::Cloud::Dataplex::V1::Partition - # List metadata partitions of an entity. - rpc :ListPartitions, ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Google::Cloud::Dataplex::V1::ListPartitionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb deleted file mode 100644 index e770523ffff7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/processing_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/processing.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n)google/cloud/dataplex/v1/processing.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger").msgclass - Trigger::OnDemand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.OnDemand").msgclass - Trigger::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Trigger.Schedule").msgclass - 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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb deleted file mode 100644 index 374c09e4b98a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/resources_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/dataplex/v1/resources.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\x07\n\x04Lake\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Lake.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x1c\n\x0fservice_account\x18\t \x01(\tB\x03\xe0\x41\x03\x12@\n\tmetastore\x18\x66 \x01(\x0b\x32(.google.cloud.dataplex.v1.Lake.MetastoreB\x03\xe0\x41\x01\x12@\n\x0c\x61sset_status\x18g \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x12M\n\x10metastore_status\x18h \x01(\x0b\x32..google.cloud.dataplex.v1.Lake.MetastoreStatusB\x03\xe0\x41\x03\x1a!\n\tMetastore\x12\x14\n\x07service\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xf8\x01\n\x0fMetastoreStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Lake.MetastoreStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\"L\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:W\xea\x41T\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x34projects/{project}/locations/{location}/lakes/{lake}\"~\n\x0b\x41ssetStatus\x12/\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\ractive_assets\x18\x02 \x01(\x05\x12\'\n\x1fsecurity_policy_applying_assets\x18\x03 \x01(\x05\"\xf4\x0b\n\x04Zone\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x06 \x03(\x0b\x32*.google.cloud.dataplex.v1.Zone.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12\x39\n\x04type\x18\t \x01(\x0e\x32#.google.cloud.dataplex.v1.Zone.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12I\n\x0e\x64iscovery_spec\x18g \x01(\x0b\x32,.google.cloud.dataplex.v1.Zone.DiscoverySpecB\x03\xe0\x41\x01\x12G\n\rresource_spec\x18h \x01(\x0b\x32+.google.cloud.dataplex.v1.Zone.ResourceSpecB\x03\xe0\x41\x02\x12@\n\x0c\x61sset_status\x18i \x01(\x0b\x32%.google.cloud.dataplex.v1.AssetStatusB\x03\xe0\x41\x03\x1a\xbb\x01\n\x0cResourceSpec\x12W\n\rlocation_type\x18\x01 \x01(\x0e\x32\x38.google.cloud.dataplex.v1.Zone.ResourceSpec.LocationTypeB\x06\xe0\x41\x02\xe0\x41\x05\"R\n\x0cLocationType\x12\x1d\n\x19LOCATION_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rSINGLE_REGION\x10\x01\x12\x10\n\x0cMULTI_REGION\x10\x02\x1a\xf6\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12S\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x0b\n\x07\x43URATED\x10\x02:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x41projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}\"\xab\x11\n\x06\x41\x63tion\x12;\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32).google.cloud.dataplex.v1.Action.Category\x12\r\n\x05issue\x18\x02 \x01(\t\x12/\n\x0b\x64\x65tect_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x04name\x18\x05 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1e\x64\x61taplex.googleapis.com/Action\x12\x32\n\x04lake\x18\x06 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Lake\x12\x32\n\x04zone\x18\x07 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Zone\x12\x34\n\x05\x61sset\x18\x08 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x16\n\x0e\x64\x61ta_locations\x18\t \x03(\t\x12Q\n\x13invalid_data_format\x18\n \x01(\x0b\x32\x32.google.cloud.dataplex.v1.Action.InvalidDataFormatH\x00\x12[\n\x18incompatible_data_schema\x18\x0b \x01(\x0b\x32\x37.google.cloud.dataplex.v1.Action.IncompatibleDataSchemaH\x00\x12W\n\x16invalid_data_partition\x18\x0c \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.InvalidDataPartitionH\x00\x12\x44\n\x0cmissing_data\x18\r \x01(\x0b\x32,.google.cloud.dataplex.v1.Action.MissingDataH\x00\x12L\n\x10missing_resource\x18\x0e \x01(\x0b\x32\x30.google.cloud.dataplex.v1.Action.MissingResourceH\x00\x12V\n\x15unauthorized_resource\x18\x0f \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Action.UnauthorizedResourceH\x00\x12\x62\n\x1c\x66\x61iled_security_policy_apply\x18\x15 \x01(\x0b\x32:.google.cloud.dataplex.v1.Action.FailedSecurityPolicyApplyH\x00\x12]\n\x19invalid_data_organization\x18\x16 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Action.InvalidDataOrganizationH\x00\x1a\x11\n\x0fMissingResource\x1a\x16\n\x14UnauthorizedResource\x1a*\n\x19\x46\x61iledSecurityPolicyApply\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x1a`\n\x11InvalidDataFormat\x12\x1e\n\x16sampled_data_locations\x18\x01 \x03(\t\x12\x17\n\x0f\x65xpected_format\x18\x02 \x01(\t\x12\x12\n\nnew_format\x18\x03 \x01(\t\x1a\xa0\x02\n\x16IncompatibleDataSchema\x12\r\n\x05table\x18\x01 \x01(\t\x12\x17\n\x0f\x65xisting_schema\x18\x02 \x01(\t\x12\x12\n\nnew_schema\x18\x03 \x01(\t\x12\x1e\n\x16sampled_data_locations\x18\x04 \x03(\t\x12[\n\rschema_change\x18\x05 \x01(\x0e\x32\x44.google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange\"M\n\x0cSchemaChange\x12\x1d\n\x19SCHEMA_CHANGE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINCOMPATIBLE\x10\x01\x12\x0c\n\x08MODIFIED\x10\x02\x1a\xe1\x01\n\x14InvalidDataPartition\x12\x64\n\x12\x65xpected_structure\x18\x01 \x01(\x0e\x32H.google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure\"c\n\x12PartitionStructure\x12#\n\x1fPARTITION_STRUCTURE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43ONSISTENT_KEYS\x10\x01\x12\x13\n\x0fHIVE_STYLE_KEYS\x10\x02\x1a\r\n\x0bMissingData\x1a\x19\n\x17InvalidDataOrganization\"f\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x17\n\x13RESOURCE_MANAGEMENT\x10\x01\x12\x13\n\x0fSECURITY_POLICY\x10\x02\x12\x12\n\x0e\x44\x41TA_DISCOVERY\x10\x03:\xa2\x02\xea\x41\x9e\x02\n\x1e\x64\x61taplex.googleapis.com/Action\x12\x45projects/{project}/locations/{location}/lakes/{lake}/actions/{action}\x12Rprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}\x12\x61projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}B\t\n\x07\x64\x65tails\"\xa4\x15\n\x05\x41sset\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1d\x64\x61taplex.googleapis.com/Asset\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x06 \x03(\x0b\x32+.google.cloud.dataplex.v1.Asset.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x08 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12H\n\rresource_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Asset.ResourceSpecB\x03\xe0\x41\x02\x12L\n\x0fresource_status\x18\x65 \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.ResourceStatusB\x03\xe0\x41\x03\x12L\n\x0fsecurity_status\x18g \x01(\x0b\x32..google.cloud.dataplex.v1.Asset.SecurityStatusB\x03\xe0\x41\x03\x12J\n\x0e\x64iscovery_spec\x18j \x01(\x0b\x32-.google.cloud.dataplex.v1.Asset.DiscoverySpecB\x03\xe0\x41\x01\x12N\n\x10\x64iscovery_status\x18k \x01(\x0b\x32/.google.cloud.dataplex.v1.Asset.DiscoveryStatusB\x03\xe0\x41\x03\x1a\xdb\x01\n\x0eSecurityStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.SecurityStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x41PPLYING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x1a\xf8\x03\n\rDiscoverySpec\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1d\n\x10include_patterns\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x65xclude_patterns\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12R\n\x0b\x63sv_options\x18\x04 \x01(\x0b\x32\x38.google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptionsB\x03\xe0\x41\x01\x12T\n\x0cjson_options\x18\x05 \x01(\x0b\x32\x39.google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptionsB\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\n \x01(\tB\x03\xe0\x41\x01H\x00\x1az\n\nCsvOptions\x12\x18\n\x0bheader_rows\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x16\n\tdelimiter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x0bJsonOptions\x12\x15\n\x08\x65ncoding\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16\x64isable_type_inference\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x42\t\n\x07trigger\x1a\xce\x02\n\x0cResourceSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12G\n\x04type\x18\x02 \x01(\x0e\x32\x31.google.cloud.dataplex.v1.Asset.ResourceSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x10read_access_mode\x18\x05 \x01(\x0e\x32\x37.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessModeB\x03\xe0\x41\x01\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTORAGE_BUCKET\x10\x01\x12\x14\n\x10\x42IGQUERY_DATASET\x10\x02\"B\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44IRECT\x10\x01\x12\x0b\n\x07MANAGED\x10\x02\x1a\xf3\x01\n\x0eResourceStatus\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.dataplex.v1.Asset.ResourceStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12$\n\x17managed_access_identity\x18\x04 \x01(\tB\x03\xe0\x41\x03\"4\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x1a\xf4\x03\n\x0f\x44iscoveryStatus\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rlast_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x05stats\x18\x06 \x01(\x0b\x32\x35.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats\x12\x34\n\x11last_run_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\x1aP\n\x05Stats\x12\x12\n\ndata_items\x18\x01 \x01(\x03\x12\x11\n\tdata_size\x18\x02 \x01(\x03\x12\x0e\n\x06tables\x18\x03 \x01(\x03\x12\x10\n\x08\x66ilesets\x18\x04 \x01(\x03\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\x0c\n\x08\x44ISABLED\x10\x05\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:t\xea\x41q\n\x1d\x64\x61taplex.googleapis.com/Asset\x12Pprojects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}*[\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x13\n\x0f\x41\x43TION_REQUIRED\x10\x04\x42j\n\x1c\x63om.google.cloud.dataplex.v1B\x0eResourcesProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - Lake = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake").msgclass - Lake::Metastore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.Metastore").msgclass - Lake::MetastoreStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus").msgclass - Lake::MetastoreStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Lake.MetastoreStatus.State").enummodule - AssetStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.AssetStatus").msgclass - Zone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone").msgclass - Zone::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec").msgclass - Zone::ResourceSpec::LocationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType").enummodule - Zone::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec").msgclass - Zone::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions").msgclass - Zone::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions").msgclass - Zone::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Zone.Type").enummodule - Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action").msgclass - Action::MissingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingResource").msgclass - Action::UnauthorizedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.UnauthorizedResource").msgclass - Action::FailedSecurityPolicyApply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply").msgclass - Action::InvalidDataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataFormat").msgclass - Action::IncompatibleDataSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema").msgclass - Action::IncompatibleDataSchema::SchemaChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange").enummodule - Action::InvalidDataPartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition").msgclass - Action::InvalidDataPartition::PartitionStructure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure").enummodule - Action::MissingData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.MissingData").msgclass - Action::InvalidDataOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.InvalidDataOrganization").msgclass - Action::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Action.Category").enummodule - Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset").msgclass - Asset::SecurityStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus").msgclass - Asset::SecurityStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.SecurityStatus.State").enummodule - Asset::DiscoverySpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec").msgclass - Asset::DiscoverySpec::CsvOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions").msgclass - Asset::DiscoverySpec::JsonOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions").msgclass - Asset::ResourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec").msgclass - Asset::ResourceSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.Type").enummodule - Asset::ResourceSpec::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode").enummodule - Asset::ResourceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus").msgclass - Asset::ResourceStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.ResourceStatus.State").enummodule - Asset::DiscoveryStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus").msgclass - Asset::DiscoveryStatus::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats").msgclass - Asset::DiscoveryStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Asset.DiscoveryStatus.State").enummodule - State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb deleted file mode 100644 index a9a9feb5cf01..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/rest.rb +++ /dev/null @@ -1,45 +0,0 @@ -# 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 "google/cloud/dataplex/v1/dataplex_service/rest" -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/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" -require "google/cloud/dataplex/v1/bindings_override" -require "google/cloud/dataplex/v1/version" - -module Google - module Cloud - module Dataplex - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/dataplex/v1/rest" - # client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb deleted file mode 100644 index 09bb0b83ffd6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/security_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/security.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\'google/cloud/dataplex/v1/security.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\"U\n\x12ResourceAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x14\n\x07writers\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x13\n\x06owners\x18\x03 \x03(\tB\x03\xe0\x41\x01\"&\n\x0e\x44\x61taAccessSpec\x12\x14\n\x07readers\x18\x01 \x03(\tB\x03\xe0\x41\x01\x42i\n\x1c\x63om.google.cloud.dataplex.v1B\rSecurityProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - ResourceAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ResourceAccessSpec").msgclass - DataAccessSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DataAccessSpec").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb deleted file mode 100644 index 89e84dcb80b8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/cloud/dataplex/v1/tasks_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/dataplex/v1/service.proto\x12\x18google.cloud.dataplex.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/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 -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - CreateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateLakeRequest").msgclass - UpdateLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateLakeRequest").msgclass - DeleteLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteLakeRequest").msgclass - ListLakesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesRequest").msgclass - ListLakesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakesResponse").msgclass - ListLakeActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListLakeActionsRequest").msgclass - ListActionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListActionsResponse").msgclass - GetLakeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetLakeRequest").msgclass - CreateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateZoneRequest").msgclass - UpdateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateZoneRequest").msgclass - DeleteZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteZoneRequest").msgclass - ListZonesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesRequest").msgclass - ListZonesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZonesResponse").msgclass - ListZoneActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListZoneActionsRequest").msgclass - GetZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetZoneRequest").msgclass - CreateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateAssetRequest").msgclass - UpdateAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateAssetRequest").msgclass - DeleteAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteAssetRequest").msgclass - ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsRequest").msgclass - ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetsResponse").msgclass - ListAssetActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListAssetActionsRequest").msgclass - GetAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetAssetRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.OperationMetadata").msgclass - CreateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CreateTaskRequest").msgclass - UpdateTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.UpdateTaskRequest").msgclass - DeleteTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.DeleteTaskRequest").msgclass - ListTasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksRequest").msgclass - ListTasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListTasksResponse").msgclass - GetTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetTaskRequest").msgclass - GetJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.GetJobRequest").msgclass - RunTaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskRequest").msgclass - RunTaskResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.RunTaskResponse").msgclass - ListJobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsRequest").msgclass - ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.ListJobsResponse").msgclass - CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.CancelJobRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb deleted file mode 100644 index d3e7f876d98b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/service_services_pb.rb +++ /dev/null @@ -1,104 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/dataplex/v1/service.proto for package 'google.cloud.dataplex.v1' -# Original file comments: -# Copyright 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/service_pb' - -module Google - module Cloud - module Dataplex - module V1 - module DataplexService - # Dataplex service provides data lakes as a service. The primary resources - # offered by this service are Lakes, Zones and Assets which collectively allow - # a data administrator to organize, manage, secure and catalog data across - # their organization located across cloud projects in a variety of storage - # systems including Cloud Storage and BigQuery. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.dataplex.v1.DataplexService' - - # Creates a lake resource. - rpc :CreateLake, ::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Google::Longrunning::Operation - # Updates a lake resource. - rpc :UpdateLake, ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Google::Longrunning::Operation - # Deletes a lake resource. All zones within the lake must be deleted before - # the lake can be deleted. - rpc :DeleteLake, ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Google::Longrunning::Operation - # Lists lake resources in a project and location. - rpc :ListLakes, ::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Google::Cloud::Dataplex::V1::ListLakesResponse - # Retrieves a lake resource. - rpc :GetLake, ::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Google::Cloud::Dataplex::V1::Lake - # Lists action resources in a lake. - rpc :ListLakeActions, ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse - # Creates a zone resource within a lake. - rpc :CreateZone, ::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Google::Longrunning::Operation - # Updates a zone resource. - rpc :UpdateZone, ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Google::Longrunning::Operation - # Deletes a zone resource. All assets within a zone must be deleted before - # the zone can be deleted. - rpc :DeleteZone, ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Google::Longrunning::Operation - # Lists zone resources in a lake. - rpc :ListZones, ::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Google::Cloud::Dataplex::V1::ListZonesResponse - # Retrieves a zone resource. - rpc :GetZone, ::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Google::Cloud::Dataplex::V1::Zone - # Lists action resources in a zone. - rpc :ListZoneActions, ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse - # Creates an asset resource. - rpc :CreateAsset, ::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Google::Longrunning::Operation - # Updates an asset resource. - rpc :UpdateAsset, ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Google::Longrunning::Operation - # Deletes an asset resource. The referenced storage resource is detached - # (default) or deleted based on the associated Lifecycle policy. - rpc :DeleteAsset, ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Google::Longrunning::Operation - # Lists asset resources in a zone. - rpc :ListAssets, ::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Google::Cloud::Dataplex::V1::ListAssetsResponse - # Retrieves an asset resource. - rpc :GetAsset, ::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Google::Cloud::Dataplex::V1::Asset - # Lists action resources in an asset. - rpc :ListAssetActions, ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Google::Cloud::Dataplex::V1::ListActionsResponse - # Creates a task resource within a lake. - rpc :CreateTask, ::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Google::Longrunning::Operation - # Update the task resource. - rpc :UpdateTask, ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Google::Longrunning::Operation - # Delete the task resource. - rpc :DeleteTask, ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Google::Longrunning::Operation - # Lists tasks under the given lake. - rpc :ListTasks, ::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Google::Cloud::Dataplex::V1::ListTasksResponse - # Get task resource. - rpc :GetTask, ::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Google::Cloud::Dataplex::V1::Task - # Lists Jobs under the given task. - rpc :ListJobs, ::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Google::Cloud::Dataplex::V1::ListJobsResponse - # Run an on demand execution of a Task. - rpc :RunTask, ::Google::Cloud::Dataplex::V1::RunTaskRequest, ::Google::Cloud::Dataplex::V1::RunTaskResponse - # Get job resource. - rpc :GetJob, ::Google::Cloud::Dataplex::V1::GetJobRequest, ::Google::Cloud::Dataplex::V1::Job - # Cancel jobs running for the task resource. - rpc :CancelJob, ::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb deleted file mode 100644 index 1530fc4bfcbe..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/tasks_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/dataplex/v1/tasks.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/dataplex/v1/resources_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n$google/cloud/dataplex/v1/tasks.proto\x12\x18google.cloud.dataplex.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/dataplex/v1/resources.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x16\n\x04Task\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x05state\x18\x07 \x01(\x0e\x32\x1f.google.cloud.dataplex.v1.StateB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32*.google.cloud.dataplex.v1.Task.LabelsEntryB\x03\xe0\x41\x01\x12\x45\n\x0ctrigger_spec\x18\x64 \x01(\x0b\x32*.google.cloud.dataplex.v1.Task.TriggerSpecB\x03\xe0\x41\x02\x12I\n\x0e\x65xecution_spec\x18\x65 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x02\x12N\n\x10\x65xecution_status\x18\xc9\x01 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.ExecutionStatusB\x03\xe0\x41\x03\x12@\n\x05spark\x18\xac\x02 \x01(\x0b\x32..google.cloud.dataplex.v1.Task.SparkTaskConfigH\x00\x12\x46\n\x08notebook\x18\xae\x02 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.NotebookTaskConfigH\x00\x1a\x9a\x06\n\x12InfrastructureSpec\x12X\n\x05\x62\x61tch\x18\x34 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResourcesH\x00\x12\x62\n\x0f\x63ontainer_image\x18\x65 \x01(\x0b\x32G.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntimeH\x01\x12T\n\x0bvpc_network\x18\x96\x01 \x01(\x0b\x32<.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetworkH\x02\x1aW\n\x15\x42\x61tchComputeResources\x12\x1c\n\x0f\x65xecutors_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12 \n\x13max_executors_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x1a\x86\x02\n\x15\x43ontainerImageRuntime\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tjava_jars\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpython_packages\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12p\n\nproperties\x18\x04 \x03(\x0b\x32W.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.PropertiesEntryB\x03\xe0\x41\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\nVpcNetwork\x12\x16\n\x07network\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x1a\n\x0bsub_network\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\x0cnetwork_tags\x18\x03 \x03(\tB\x03\xe0\x41\x01\x42\x0e\n\x0cnetwork_nameB\x0b\n\tresourcesB\t\n\x07runtimeB\t\n\x07network\x1a\x9a\x02\n\x0bTriggerSpec\x12\x45\n\x04type\x18\x05 \x01(\x0e\x32/.google.cloud.dataplex.v1.Task.TriggerSpec.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x15\n\x08\x64isabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bmax_retries\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\x08schedule\x18\x64 \x01(\tB\x03\xe0\x41\x01H\x00\":\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\r\n\tRECURRING\x10\x02\x42\t\n\x07trigger\x1a\x95\x02\n\rExecutionSpec\x12I\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x36.google.cloud.dataplex.v1.Task.ExecutionSpec.ArgsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07project\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x1amax_job_execution_lifetime\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x14\n\x07kms_key\x18\t \x01(\tB\x03\xe0\x41\x01\x1a+\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xa5\x02\n\x0fSparkTaskConfig\x12\x1b\n\x11main_jar_file_uri\x18\x64 \x01(\tH\x00\x12\x14\n\nmain_class\x18\x65 \x01(\tH\x00\x12\x1c\n\x12python_script_file\x18\x66 \x01(\tH\x00\x12\x19\n\x0fsql_script_file\x18h \x01(\tH\x00\x12\x14\n\nsql_script\x18i \x01(\tH\x00\x12\x16\n\tfile_uris\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12S\n\x13infrastructure_spec\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x42\x08\n\x06\x64river\x1a\xb3\x01\n\x12NotebookTaskConfig\x12\x15\n\x08notebook\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12S\n\x13infrastructure_spec\x18\x03 \x01(\x0b\x32\x31.google.cloud.dataplex.v1.Task.InfrastructureSpecB\x03\xe0\x41\x01\x12\x16\n\tfile_uris\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61rchive_uris\x18\x06 \x03(\tB\x03\xe0\x41\x01\x1a\x7f\n\x0f\x45xecutionStatus\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\nlatest_job\x18\t \x01(\x0b\x32\x1d.google.cloud.dataplex.v1.JobB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:d\xea\x41\x61\n\x1c\x64\x61taplex.googleapis.com/Task\x12\x41projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}B\x08\n\x06\x63onfig\"\xc5\x07\n\x03Job\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x03\xfa\x41\x1d\n\x1b\x64\x61taplex.googleapis.com/Job\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x05state\x18\x05 \x01(\x0e\x32#.google.cloud.dataplex.v1.Job.StateB\x03\xe0\x41\x03\x12\x18\n\x0bretry_count\x18\x06 \x01(\rB\x03\xe0\x41\x03\x12;\n\x07service\x18\x07 \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.ServiceB\x03\xe0\x41\x03\x12\x18\n\x0bservice_job\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\t \x01(\tB\x03\xe0\x41\x03\x12>\n\x06labels\x18\n \x03(\x0b\x32).google.cloud.dataplex.v1.Job.LabelsEntryB\x03\xe0\x41\x03\x12;\n\x07trigger\x18\x0b \x01(\x0e\x32%.google.cloud.dataplex.v1.Job.TriggerB\x03\xe0\x41\x03\x12I\n\x0e\x65xecution_spec\x18\x64 \x01(\x0b\x32,.google.cloud.dataplex.v1.Task.ExecutionSpecB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"0\n\x07Service\x12\x17\n\x13SERVICE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TAPROC\x10\x01\"r\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nCANCELLING\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0b\n\x07\x41\x42ORTED\x10\x06\"D\n\x07Trigger\x12\x17\n\x13TRIGGER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bTASK_CONFIG\x10\x01\x12\x0f\n\x0bRUN_REQUEST\x10\x02:n\xea\x41k\n\x1b\x64\x61taplex.googleapis.com/Job\x12Lprojects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}Bf\n\x1c\x63om.google.cloud.dataplex.v1B\nTasksProtoP\x01Z8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Dataplex - module V1 - Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task").msgclass - Task::InfrastructureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec").msgclass - Task::InfrastructureSpec::BatchComputeResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources").msgclass - Task::InfrastructureSpec::ContainerImageRuntime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime").msgclass - Task::InfrastructureSpec::VpcNetwork = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork").msgclass - Task::TriggerSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec").msgclass - Task::TriggerSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.TriggerSpec.Type").enummodule - Task::ExecutionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionSpec").msgclass - Task::SparkTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.SparkTaskConfig").msgclass - Task::NotebookTaskConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.NotebookTaskConfig").msgclass - Task::ExecutionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Task.ExecutionStatus").msgclass - Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job").msgclass - Job::Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Service").enummodule - Job::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.State").enummodule - Job::Trigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataplex.v1.Job.Trigger").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb b/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb deleted file mode 100644 index 499baaa7dd0a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/lib/google/cloud/dataplex/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md deleted file mode 100644 index b4aad34dcd67..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Dataplex V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# 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 Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # 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 - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 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 - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - 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 - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# 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 Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# 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 Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb deleted file mode 100644 index 6f78bce27124..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/analyze.rb +++ /dev/null @@ -1,294 +0,0 @@ -# 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 - # Environment represents a user-visible compute infrastructure for analytics - # within a lake. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the environment, of the form: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id} - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the environment. This - # ID will be different if the environment is deleted and re-created with the - # same name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Environment creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the environment was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the environment. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the environment. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the environment. - # @!attribute [rw] infrastructure_spec - # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec] - # Required. Infrastructure specification for the Environment. - # @!attribute [rw] session_spec - # @return [::Google::Cloud::Dataplex::V1::Environment::SessionSpec] - # Optional. Configuration for sessions created for this environment. - # @!attribute [r] session_status - # @return [::Google::Cloud::Dataplex::V1::Environment::SessionStatus] - # Output only. Status of sessions created for this environment. - # @!attribute [r] endpoints - # @return [::Google::Cloud::Dataplex::V1::Environment::Endpoints] - # Output only. URI Endpoints to access sessions associated with the - # Environment. - class Environment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the underlying infrastructure used to run workloads. - # @!attribute [rw] compute - # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::ComputeResources] - # Optional. Compute resources needed for analyze interactive workloads. - # @!attribute [rw] os_image - # @return [::Google::Cloud::Dataplex::V1::Environment::InfrastructureSpec::OsImageRuntime] - # Required. Software Runtime Configuration for analyze interactive - # workloads. - class InfrastructureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Compute resources associated with the analyze interactive workloads. - # @!attribute [rw] disk_size_gb - # @return [::Integer] - # Optional. Size in GB of the disk. Default is 100 GB. - # @!attribute [rw] node_count - # @return [::Integer] - # Optional. Total number of nodes in the sessions created for this - # environment. - # @!attribute [rw] max_node_count - # @return [::Integer] - # Optional. Max configurable nodes. - # If max_node_count > node_count, then auto-scaling is enabled. - class ComputeResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Software Runtime Configuration to run Analyze. - # @!attribute [rw] image_version - # @return [::String] - # Required. Dataplex Universal Catalog Image version. - # @!attribute [rw] java_libraries - # @return [::Array<::String>] - # Optional. List of Java jars to be included in the runtime environment. - # Valid input includes Cloud Storage URIs to Jar binaries. - # For example, gs://bucket-name/my/path/to/file.jar - # @!attribute [rw] python_packages - # @return [::Array<::String>] - # Optional. A list of python packages to be installed. - # Valid formats include Cloud Storage URI to a PIP installable library. - # For example, gs://bucket-name/my/path/to/lib.tar.gz - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Spark properties to provide configuration for use in sessions - # created for this environment. The properties to set on daemon config - # files. Property keys are specified in `prefix:property` format. The - # prefix must be "spark". - class OsImageRuntime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Configuration for sessions created for this environment. - # @!attribute [rw] max_idle_duration - # @return [::Google::Protobuf::Duration] - # Optional. The idle time configuration of the session. The session will be - # auto-terminated at the end of this period. - # @!attribute [rw] enable_fast_startup - # @return [::Boolean] - # Optional. If True, this causes sessions to be pre-created and available - # for faster startup to enable interactive exploration use-cases. This - # defaults to False to avoid additional billed charges. These can only be - # set to True for the environment with name set to "default", and with - # default configuration. - class SessionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of sessions created for this environment. - # @!attribute [r] active - # @return [::Boolean] - # Output only. Queries over sessions to mark whether the environment is - # currently active or not - class SessionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # URI Endpoints to access sessions associated with the Environment. - # @!attribute [r] notebooks - # @return [::String] - # Output only. URI to serve notebook APIs - # @!attribute [r] sql - # @return [::String] - # Output only. URI to serve SQL APIs - class Endpoints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Content represents a user-visible notebook or a sql script - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the content, of the form: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/content/\\{content_id} - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the content. This ID - # will be different if the content is deleted and re-created with the same - # name. - # @!attribute [rw] path - # @return [::String] - # Required. The path for the Content file, represented as directory - # structure. Unique within a lake. Limited to alphanumerics, hyphens, - # underscores, dots and slashes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Content creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the content was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the content. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the content. - # @!attribute [rw] data_text - # @return [::String] - # Required. Content data in string format. - # @!attribute [rw] sql_script - # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript] - # Sql Script related configurations. - # - # Note: The following fields are mutually exclusive: `sql_script`, `notebook`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] notebook - # @return [::Google::Cloud::Dataplex::V1::Content::Notebook] - # Notebook related configurations. - # - # Note: The following fields are mutually exclusive: `notebook`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Content - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the Sql Script content. - # @!attribute [rw] engine - # @return [::Google::Cloud::Dataplex::V1::Content::SqlScript::QueryEngine] - # Required. Query Engine to be used for the Sql Query. - class SqlScript - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Query Engine Type of the SQL Script. - module QueryEngine - # Value was unspecified. - QUERY_ENGINE_UNSPECIFIED = 0 - - # Spark SQL Query. - SPARK = 2 - end - end - - # Configuration for Notebook content. - # @!attribute [rw] kernel_type - # @return [::Google::Cloud::Dataplex::V1::Content::Notebook::KernelType] - # Required. Kernel Type of the notebook. - class Notebook - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Kernel Type of the Jupyter notebook. - module KernelType - # Kernel Type unspecified. - KERNEL_TYPE_UNSPECIFIED = 0 - - # Python 3 Kernel. - PYTHON3 = 1 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents an active analyze session running for a user. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the content, of the form: - # projects/\\{project_id}/locations/\\{location_id}/lakes/\\{lake_id}/environment/\\{environment_id}/sessions/\\{session_id} - # @!attribute [r] user_id - # @return [::String] - # Output only. Email of user running the session. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Session start time. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. State of Session - class Session - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/business_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/business_glossary.rb deleted file mode 100644 index 60118f7baed5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/business_glossary.rb +++ /dev/null @@ -1,531 +0,0 @@ -# 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 Glossary represents a collection of GlossaryCategories and GlossaryTerms - # defined by the user. Glossary is a top level resource and is the Google Cloud - # parent resource of all the GlossaryCategories and GlossaryTerms within it. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the Glossary. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # @!attribute [r] uid - # @return [::String] - # Output only. System generated unique id for the Glossary. This ID will be - # different if the Glossary is deleted and re-created with the - # same name. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name of the Glossary. This is user-mutable. - # This will be same as the GlossaryId, if not specified. - # @!attribute [rw] description - # @return [::String] - # Optional. The user-mutable description of the Glossary. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the Glossary was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the Glossary was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the Glossary. - # @!attribute [r] term_count - # @return [::Integer] - # Output only. The number of GlossaryTerms in the Glossary. - # @!attribute [r] category_count - # @return [::Integer] - # Output only. The number of GlossaryCategories in the Glossary. - # @!attribute [rw] etag - # @return [::String] - # Optional. Needed for resource freshness validation. - # 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. - class Glossary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A GlossaryCategory represents a collection of GlossaryCategories and - # GlossaryTerms within a Glossary that are related to each other. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the GlossaryCategory. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - # @!attribute [r] uid - # @return [::String] - # Output only. System generated unique id for the GlossaryCategory. This ID - # will be different if the GlossaryCategory is deleted and re-created with - # the same name. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name of the GlossaryCategory. This is - # user-mutable. This will be same as the GlossaryCategoryId, if not - # specified. - # @!attribute [rw] description - # @return [::String] - # Optional. The user-mutable description of the GlossaryCategory. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the GlossaryCategory was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the GlossaryCategory was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the GlossaryCategory. - # @!attribute [rw] parent - # @return [::String] - # Required. The immediate parent of the GlossaryCategory in the - # resource-hierarchy. It can either be a Glossary or a GlossaryCategory. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # OR - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - class GlossaryCategory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # GlossaryTerms are the core of Glossary. - # A GlossaryTerm holds a rich text description that can be attached to Entries - # or specific columns to enrich them. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the GlossaryTerm. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - # @!attribute [r] uid - # @return [::String] - # Output only. System generated unique id for the GlossaryTerm. This ID will - # be different if the GlossaryTerm is deleted and re-created with the same - # name. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name of the GlossaryTerm. This is - # user-mutable. This will be same as the GlossaryTermId, if not specified. - # @!attribute [rw] description - # @return [::String] - # Optional. The user-mutable description of the GlossaryTerm. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the GlossaryTerm was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the GlossaryTerm was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the GlossaryTerm. - # @!attribute [rw] parent - # @return [::String] - # Required. The immediate parent of the GlossaryTerm in the - # resource-hierarchy. It can either be a Glossary or a GlossaryCategory. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # OR - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - class GlossaryTerm - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Create Glossary Request - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this Glossary will be created. - # Format: projects/\\{project_id_or_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] glossary_id - # @return [::String] - # Required. Glossary ID: Glossary identifier. - # @!attribute [rw] glossary - # @return [::Google::Cloud::Dataplex::V1::Glossary] - # Required. The Glossary to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Validates the request without actually creating the Glossary. - # Default: false. - class CreateGlossaryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update Glossary Request - # @!attribute [rw] glossary - # @return [::Google::Cloud::Dataplex::V1::Glossary] - # Required. The Glossary to update. - # The Glossary's `name` field is used to identify the Glossary to update. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Validates the request without actually updating the Glossary. - # Default: false. - class UpdateGlossaryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete Glossary Request - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Glossary to delete. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the Glossary. - # 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. - class DeleteGlossaryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get Glossary Request - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Glossary to retrieve. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - class GetGlossaryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List Glossaries Request - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which has this collection of Glossaries. - # Format: projects/\\{project_id_or_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of Glossaries to return. The service may - # return fewer than this value. If unspecified, at most 50 Glossaries 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 `ListGlossaries` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListGlossaries` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter expression that filters Glossaries listed in the response. - # Filters on proto fields of Glossary are supported. - # Examples of using a filter are: - # - `display_name="my-glossary"` - # - `categoryCount=1` - # - `termCount=0` - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by expression that orders Glossaries listed in the - # response. Order by fields are: `name` or `create_time` for the result. If - # not specified, the ordering is undefined. - class ListGlossariesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List Glossaries Response - # @!attribute [rw] glossaries - # @return [::Array<::Google::Cloud::Dataplex::V1::Glossary>] - # Lists the Glossaries in the specified parent. - # @!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 omitted, there are no subsequent pages. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that the service couldn't reach. - class ListGlossariesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Creates a new GlossaryCategory under the specified Glossary. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this GlossaryCategory will be created. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # where `locationId` refers to a Google Cloud region. - # @!attribute [rw] category_id - # @return [::String] - # Required. GlossaryCategory identifier. - # @!attribute [rw] category - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # Required. The GlossaryCategory to create. - class CreateGlossaryCategoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update GlossaryCategory Request - # @!attribute [rw] category - # @return [::Google::Cloud::Dataplex::V1::GlossaryCategory] - # Required. The GlossaryCategory to update. - # The GlossaryCategory's `name` field is used to identify the - # GlossaryCategory to update. Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - class UpdateGlossaryCategoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete GlossaryCategory Request - # @!attribute [rw] name - # @return [::String] - # Required. The name of the GlossaryCategory to delete. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - class DeleteGlossaryCategoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get GlossaryCategory Request - # @!attribute [rw] name - # @return [::String] - # Required. The name of the GlossaryCategory to retrieve. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/categories/\\{category_id} - class GetGlossaryCategoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List GlossaryCategories Request - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which has this collection of GlossaryCategories. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # Location is the Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of GlossaryCategories to return. The service - # may return fewer than this value. If unspecified, at most 50 - # GlossaryCategories 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 `ListGlossaryCategories` - # call. Provide this to retrieve the subsequent page. When paginating, all - # other parameters provided to `ListGlossaryCategories` must match the call - # that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter expression that filters GlossaryCategories listed in the - # response. Filters are supported on the following fields: - # - immediate_parent - # - # Examples of using a filter are: - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` - # - # This will only return the GlossaryCategories that are directly nested - # under the specified parent. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by expression that orders GlossaryCategories listed in the - # response. Order by fields are: `name` or `create_time` for the result. If - # not specified, the ordering is undefined. - class ListGlossaryCategoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List GlossaryCategories Response - # @!attribute [rw] categories - # @return [::Array<::Google::Cloud::Dataplex::V1::GlossaryCategory>] - # Lists the GlossaryCategories in the specified parent. - # @!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 omitted, there are no subsequent pages. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that the service couldn't reach. - class ListGlossaryCategoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Creates a new GlossaryTerm under the specified Glossary. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where the GlossaryTerm will be created. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] term_id - # @return [::String] - # Required. GlossaryTerm identifier. - # @!attribute [rw] term - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # Required. The GlossaryTerm to create. - class CreateGlossaryTermRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update GlossaryTerm Request - # @!attribute [rw] term - # @return [::Google::Cloud::Dataplex::V1::GlossaryTerm] - # Required. The GlossaryTerm to update. - # The GlossaryTerm's `name` field is used to identify the GlossaryTerm to - # update. Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - class UpdateGlossaryTermRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete GlossaryTerm Request - # @!attribute [rw] name - # @return [::String] - # Required. The name of the GlossaryTerm to delete. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - class DeleteGlossaryTermRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get GlossaryTerm Request - # @!attribute [rw] name - # @return [::String] - # Required. The name of the GlossaryTerm to retrieve. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id}/terms/\\{term_id} - class GetGlossaryTermRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List GlossaryTerms Request - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which has this collection of GlossaryTerms. - # Format: - # projects/\\{project_id_or_number}/locations/\\{location_id}/glossaries/\\{glossary_id} - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of GlossaryTerms to return. The service may - # return fewer than this value. If unspecified, at most 50 GlossaryTerms 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 `ListGlossaryTerms` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListGlossaryTerms` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter expression that filters GlossaryTerms listed in the - # response. Filters are supported on the following fields: - # - immediate_parent - # - # Examples of using a filter are: - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}"` - # - - # `immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"` - # - # This will only return the GlossaryTerms that are directly nested under the - # specified parent. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by expression that orders GlossaryTerms listed in the - # response. Order by fields are: `name` or `create_time` for the result. If - # not specified, the ordering is undefined. - class ListGlossaryTermsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List GlossaryTerms Response - # @!attribute [rw] terms - # @return [::Array<::Google::Cloud::Dataplex::V1::GlossaryTerm>] - # Lists the GlossaryTerms in the specified parent. - # @!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 omitted, there are no subsequent pages. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that the service couldn't reach. - class ListGlossaryTermsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb deleted file mode 100644 index 3a0db77929dd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/catalog.rb +++ /dev/null @@ -1,2253 +0,0 @@ -# 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 - # AspectType is a template for creating Aspects, and represents the - # JSON-schema for a given Entry, for example, BigQuery Table Schema. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id}/aspectTypes/\\{aspect_type_id}. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the AspectType. - # If you delete and recreate the AspectType with the same name, then this ID - # will be different. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the AspectType was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the AspectType was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the AspectType. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the AspectType. - # @!attribute [rw] etag - # @return [::String] - # The service computes this checksum. The client may send it on update and - # delete requests to ensure it has an up-to-date value before proceeding. - # @!attribute [rw] data_classification - # @return [::Google::Cloud::Dataplex::V1::AspectType::DataClassification] - # Optional. Immutable. Stores data classification of the aspect. - # @!attribute [rw] authorization - # @return [::Google::Cloud::Dataplex::V1::AspectType::Authorization] - # Immutable. Defines the Authorization for this type. - # @!attribute [rw] metadata_template - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] - # Required. MetadataTemplate of the aspect. - # @!attribute [r] transfer_status - # @return [::Google::Cloud::Dataplex::V1::TransferStatus] - # Output only. Denotes the transfer status of the Aspect Type. It is - # unspecified for Aspect Types created from Dataplex API. - class AspectType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Authorization for an AspectType. - # @!attribute [rw] alternate_use_permission - # @return [::String] - # Immutable. The IAM permission grantable on the EntryGroup to allow access - # to instantiate Aspects of Dataplex Universal Catalog owned AspectTypes, - # only settable for Dataplex Universal Catalog owned Types. - class Authorization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MetadataTemplate definition for an AspectType. - # @!attribute [rw] index - # @return [::Integer] - # Optional. Index is used to encode Template messages. The value of index - # can range between 1 and 2,147,483,647. Index must be unique within all - # fields in a Template. (Nested Templates can reuse indexes). Once a - # Template is defined, the index cannot be changed, because it identifies - # the field in the actual storage format. Index is a mandatory field, but - # it is optional for top level fields, and map/array "values" definitions. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the field. - # @!attribute [rw] type - # @return [::String] - # Required. The datatype of this field. The following values are supported: - # - # Primitive types: - # - # * string - # * int - # * bool - # * double - # * datetime. Must be of the format RFC3339 UTC "Zulu" (Examples: - # "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). - # - # Complex types: - # - # * enum - # * array - # * map - # * record - # @!attribute [rw] record_fields - # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate>] - # Optional. Field definition. You must specify it if the type is record. It - # defines the nested fields. - # @!attribute [rw] enum_values - # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::EnumValue>] - # Optional. The list of values for an enum type. You must define it if the - # type is enum. - # @!attribute [rw] map_items - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] - # Optional. If the type is map, set map_items. map_items can refer to a - # primitive field or a complex (record only) field. To specify a primitive - # field, you only need to set name and type in the nested - # MetadataTemplate. The recommended value for the name field is item, as - # this isn't used in the actual payload. - # @!attribute [rw] array_items - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate] - # Optional. If the type is array, set array_items. array_items can refer - # to a primitive field or a complex (record only) field. To specify a - # primitive field, you only need to set name and type in the nested - # MetadataTemplate. The recommended value for the name field is item, as - # this isn't used in the actual payload. - # @!attribute [rw] type_id - # @return [::String] - # Optional. You can use type id if this definition of the field needs to be - # reused later. The type id must be unique across the entire template. You - # can only specify it if the field type is record. - # @!attribute [rw] type_ref - # @return [::String] - # Optional. A reference to another field definition (not an inline - # definition). The value must be equal to the value of an id field defined - # elsewhere in the MetadataTemplate. Only fields with record type can - # refer to other fields. - # @!attribute [rw] constraints - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Constraints] - # Optional. Specifies the constraints on this field. - # @!attribute [rw] annotations - # @return [::Google::Cloud::Dataplex::V1::AspectType::MetadataTemplate::Annotations] - # Optional. Specifies annotations on this field. - class MetadataTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Definition of Enumvalue, to be used for enum fields. - # @!attribute [rw] index - # @return [::Integer] - # Required. Index for the enum value. It can't be modified. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the enumvalue. This is the actual value that the - # aspect can contain. - # @!attribute [rw] deprecated - # @return [::String] - # Optional. You can set this message if you need to deprecate an enum - # value. - class EnumValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Definition of the constraints of a field. - # @!attribute [rw] required - # @return [::Boolean] - # Optional. Marks this field as optional or required. - class Constraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Definition of the annotations of a field. - # @!attribute [rw] deprecated - # @return [::String] - # Optional. Marks a field as deprecated. You can include a deprecation - # message. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Display name for a field. - # @!attribute [rw] description - # @return [::String] - # Optional. Description for a field. - # @!attribute [rw] display_order - # @return [::Integer] - # Optional. Display order for a field. You can use this to reorder where - # a field is rendered. - # @!attribute [rw] string_type - # @return [::String] - # Optional. You can use String Type annotations to specify special - # meaning to string fields. The following values are supported: - # - # * richText: The field must be interpreted as a rich text field. - # * url: A fully qualified URL link. - # * resource: A service qualified resource reference. - # @!attribute [rw] string_values - # @return [::Array<::String>] - # Optional. Suggested hints for string fields. You can use them to - # suggest values to users through console. - class Annotations - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Classifies the data stored by the aspect. - module DataClassification - # Denotes that the aspect contains only metadata. - DATA_CLASSIFICATION_UNSPECIFIED = 0 - - # Metadata and data classification. - METADATA_AND_DATA = 1 - end - end - - # An Entry Group represents a logical grouping of one or more Entries. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the EntryGroup, in the format - # projects/\\{project_id_or_number}/locations/\\{location_id}/entryGroups/\\{entry_group_id}. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the EntryGroup. If you - # delete and recreate the EntryGroup with the same name, this ID will be - # different. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryGroup was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryGroup was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the EntryGroup. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the EntryGroup. - # @!attribute [rw] etag - # @return [::String] - # This checksum is computed by the service, and might be sent on update and - # delete requests to ensure the client has an up-to-date value before - # proceeding. - # @!attribute [r] transfer_status - # @return [::Google::Cloud::Dataplex::V1::TransferStatus] - # Output only. Denotes the transfer status of the Entry Group. It is - # unspecified for Entry Group created from Dataplex API. - class EntryGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Entry Type is a template for creating Entries. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id}/entryTypes/\\{entry_type_id}. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the EntryType. This ID - # will be different if the EntryType is deleted and re-created with the same - # name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryType was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the EntryType was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the EntryType. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the EntryType. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the service, and might be sent on - # update and delete requests to ensure the client has an up-to-date value - # before proceeding. - # @!attribute [rw] type_aliases - # @return [::Array<::String>] - # Optional. Indicates the classes this Entry Type belongs to, for example, - # TABLE, DATABASE, MODEL. - # @!attribute [rw] platform - # @return [::String] - # Optional. The platform that Entries of this type belongs to. - # @!attribute [rw] system - # @return [::String] - # Optional. The system that Entries of this type belongs to. Examples include - # CloudSQL, MariaDB etc - # @!attribute [rw] required_aspects - # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType::AspectInfo>] - # AspectInfo for the entry type. - # @!attribute [rw] authorization - # @return [::Google::Cloud::Dataplex::V1::EntryType::Authorization] - # Immutable. Authorization defined for this type. - class EntryType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] type - # @return [::String] - # Required aspect type for the entry type. - class AspectInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Authorization for an Entry Type. - # @!attribute [rw] alternate_use_permission - # @return [::String] - # Immutable. The IAM permission grantable on the Entry Group to allow - # access to instantiate Entries of Dataplex Universal Catalog owned Entry - # Types, only settable for Dataplex Universal Catalog owned Types. - class Authorization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An aspect is a single piece of metadata describing an entry. - # @!attribute [r] aspect_type - # @return [::String] - # Output only. The resource name of the type used to create this Aspect. - # @!attribute [r] path - # @return [::String] - # Output only. The path in the entry under which the aspect is attached. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Aspect was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Aspect was last updated. - # @!attribute [rw] data - # @return [::Google::Protobuf::Struct] - # Required. The content of the aspect, according to its aspect type schema. - # The maximum size of the field is 120KB (encoded as UTF-8). - # @!attribute [rw] aspect_source - # @return [::Google::Cloud::Dataplex::V1::AspectSource] - # Optional. Information related to the source system of the aspect. - class Aspect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information related to the source system of the aspect. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time the aspect was created in the source system. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time the aspect was last updated in the source system. - # @!attribute [rw] data_version - # @return [::String] - # The version of the data format used to produce this data. This field is - # used to indicated when the underlying data format changes (e.g., schema - # modifications, changes to the source URL format definition, etc). - class AspectSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An entry is a representation of a data resource that can be described by - # various metadata. - # @!attribute [rw] name - # @return [::String] - # Identifier. The relative resource name of the entry, in the format - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. - # @!attribute [rw] entry_type - # @return [::String] - # Required. Immutable. The relative resource name of the entry type that was - # used to create this entry, in the format - # `projects/{project_id_or_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the entry was created in Dataplex Universal - # Catalog. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the entry was last updated in Dataplex Universal - # Catalog. - # @!attribute [rw] aspects - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dataplex::V1::Aspect}] - # Optional. The aspects that are attached to the entry. Depending on how the - # aspect is attached to the entry, the format of the aspect key can be one of - # the following: - # - # * If the aspect is attached directly to the entry: - # `{project_id_or_number}.{location_id}.{aspect_type_id}` - # * If the aspect is attached to an entry's path: - # `{project_id_or_number}.{location_id}.{aspect_type_id}@{path}` - # @!attribute [rw] parent_entry - # @return [::String] - # Optional. Immutable. The resource name of the parent entry, in the format - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`. - # @!attribute [rw] fully_qualified_name - # @return [::String] - # Optional. A name for the entry that can be referenced by an external - # system. For more information, see [Fully qualified - # names](https://cloud.google.com/data-catalog/docs/fully-qualified-names). - # The maximum size of the field is 4000 characters. - # @!attribute [rw] entry_source - # @return [::Google::Cloud::Dataplex::V1::EntrySource] - # Optional. Information related to the source system of the data resource - # that is represented by the entry. - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Dataplex::V1::Aspect] - class AspectsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Information related to the source system of the data resource that is - # represented by the entry. - # @!attribute [rw] resource - # @return [::String] - # The name of the resource in the source system. - # Maximum length is 4,000 characters. - # @!attribute [rw] system - # @return [::String] - # The name of the source system. - # Maximum length is 64 characters. - # @!attribute [rw] platform - # @return [::String] - # The platform containing the source system. - # Maximum length is 64 characters. - # @!attribute [rw] display_name - # @return [::String] - # A user-friendly display name. - # Maximum length is 500 characters. - # @!attribute [rw] description - # @return [::String] - # A description of the data resource. - # Maximum length is 2,000 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # User-defined labels. - # The maximum size of keys and values is 128 characters each. - # @!attribute [rw] ancestors - # @return [::Array<::Google::Cloud::Dataplex::V1::EntrySource::Ancestor>] - # Immutable. The entries representing the ancestors of the data resource in - # the source system. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the resource was created in the source system. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the resource was last updated in the source system. If the - # entry exists in the system and its `EntrySource` has `update_time` - # populated, further updates to the `EntrySource` of the entry must provide - # incremental updates to its `update_time`. - # @!attribute [r] location - # @return [::String] - # Output only. Location of the resource in the source system. You can search - # the entry by this location. By default, this should match the location of - # the entry group containing this entry. A different value allows capturing - # the source location for data external to Google Cloud. - class EntrySource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about individual items in the hierarchy that is associated with - # the data resource. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of the ancestor resource. - # @!attribute [rw] type - # @return [::String] - # Optional. The type of the ancestor resource. - class Ancestor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Create EntryGroup Request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the entryGroup, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] entry_group_id - # @return [::String] - # Required. EntryGroup identifier. - # @!attribute [rw] entry_group - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # Required. EntryGroup Resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. The service validates the request without performing any - # mutations. The default is false. - class CreateEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update EntryGroup Request. - # @!attribute [rw] entry_group - # @return [::Google::Cloud::Dataplex::V1::EntryGroup] - # Required. EntryGroup Resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. The service validates the request, without performing any - # mutations. The default is false. - class UpdateEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete EntryGroup Request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryGroupRequest method returns an ABORTED error - # response. - class DeleteEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List entryGroups request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the entryGroup location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of EntryGroups to return. The service may return - # fewer than this value. If unspecified, the service returns at most 10 - # EntryGroups. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListEntryGroups` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters you provide to `ListEntryGroups` must match the call that - # provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListEntryGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List entry groups response. - # @!attribute [rw] entry_groups - # @return [::Array<::Google::Cloud::Dataplex::V1::EntryGroup>] - # Entry groups under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that the service couldn't reach. - class ListEntryGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get EntryGroup request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryGroup: - # `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - class GetEntryGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create EntryType Request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the EntryType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] entry_type_id - # @return [::String] - # Required. EntryType identifier. - # @!attribute [rw] entry_type - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # Required. EntryType Resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. The service validates the request without performing any - # mutations. The default is false. - class CreateEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update EntryType Request. - # @!attribute [rw] entry_type - # @return [::Google::Cloud::Dataplex::V1::EntryType] - # Required. EntryType Resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. The service validates the request without performing any - # mutations. The default is false. - class UpdateEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete EntryType Request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteEntryTypeRequest method returns an ABORTED error response. - class DeleteEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List EntryTypes request - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the EntryType location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of EntryTypes to return. The service may return - # fewer than this value. If unspecified, the service returns at most 10 - # EntryTypes. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListEntryTypes` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters you provided to `ListEntryTypes` must match the call that - # provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. Filters are case-sensitive. - # The service supports the following formats: - # - # * labels.key1 = "value1" - # * labels:key1 - # * name = "value" - # - # These restrictions can be conjoined with AND, OR, and NOT conjunctions. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Orders the result by `name` or `create_time` fields. - # If not specified, the ordering is undefined. - class ListEntryTypesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List EntryTypes response. - # @!attribute [rw] entry_types - # @return [::Array<::Google::Cloud::Dataplex::V1::EntryType>] - # EntryTypes under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that the service couldn't reach. - class ListEntryTypesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get EntryType request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EntryType: - # `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - class GetEntryTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create AspectType Request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AspectType, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] aspect_type_id - # @return [::String] - # Required. AspectType identifier. - # @!attribute [rw] aspect_type - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # Required. AspectType Resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. The service validates the request without performing any - # mutations. The default is false. - class CreateAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update AspectType Request - # @!attribute [rw] aspect_type - # @return [::Google::Cloud::Dataplex::V1::AspectType] - # Required. AspectType Resource - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete AspectType Request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteAspectTypeRequest method returns an ABORTED error - # response. - class DeleteAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List AspectTypes request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the AspectType location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of AspectTypes to return. The service may return - # fewer than this value. If unspecified, the service returns at most 10 - # AspectTypes. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListAspectTypes` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters you provide to `ListAspectTypes` 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" - # - # These restrictions can be conjoined with AND, OR, and NOT conjunctions. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Orders the result by `name` or `create_time` fields. - # If not specified, the ordering is undefined. - class ListAspectTypesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List AspectTypes response. - # @!attribute [rw] aspect_types - # @return [::Array<::Google::Cloud::Dataplex::V1::AspectType>] - # AspectTypes under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that the service couldn't reach. - class ListAspectTypesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get AspectType request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the AspectType: - # `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - class GetAspectTypeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create Entry request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @!attribute [rw] entry_id - # @return [::String] - # Required. Entry identifier. It has to be unique within an Entry Group. - # - # Entries corresponding to Google Cloud resources use an Entry ID format - # based on [full resource - # names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - # The format is a full resource name of the resource without the - # prefix double slashes in the API service name part of the full resource - # name. This allows retrieval of entries using their associated resource - # name. - # - # For example, if the full resource name of a resource is - # `//library.googleapis.com/shelves/shelf1/books/book2`, - # then the suggested entry_id is - # `library.googleapis.com/shelves/shelf1/books/book2`. - # - # It is also suggested to follow the same convention for entries - # corresponding to resources from providers or systems other than Google - # Cloud. - # - # The maximum size of the field is 4000 characters. - # @!attribute [rw] entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Required. Entry resource. - class CreateEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update Entry request. - # @!attribute [rw] entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Required. Entry resource. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Mask of fields to update. To update Aspects, the update_mask must - # contain the value "aspects". - # - # If the update_mask is empty, the service will update all modifiable fields - # present in the request. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true and the entry doesn't exist, the service will - # create it. - # @!attribute [rw] delete_missing_aspects - # @return [::Boolean] - # Optional. If set to true and the aspect_keys specify aspect ranges, the - # service deletes any existing aspects from that range that weren't provided - # in the request. - # @!attribute [rw] aspect_keys - # @return [::Array<::String>] - # Optional. The map keys of the Aspects which the service should modify. It - # supports the following syntaxes: - # - # * `` - matches an aspect of the given type and empty - # path. - # * `@path` - matches an aspect of the given type and - # specified path. For example, to attach an aspect to a field that is - # specified by the `schema` aspect, the path should have the format - # `Schema.`. - # * `@*` - matches aspects of the given type for all - # paths. - # * `*@path` - matches aspects of all types on the given path. - # - # The service will not remove existing aspects matching the syntax unless - # `delete_missing_aspects` is set to true. - # - # If this field is left empty, the service treats it as specifying - # exactly those Aspects present in the request. - class UpdateEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete Entry request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - class DeleteEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List Entries request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of items to return per page. If there are remaining - # results, the service returns a next_page_token. If unspecified, the service - # returns at most 10 Entries. The maximum value is 100; values above 100 will - # be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListEntries` call. Provide - # this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter on the entries to return. Filters are case-sensitive. - # You can filter the request by the following fields: - # - # * entry_type - # * entry_source.display_name - # * parent_entry - # - # The comparison operators are =, !=, <, >, <=, >=. The service compares - # strings according to lexical order. - # - # You can use the logical operators AND, OR, NOT in the filter. - # - # You can use Wildcard "*", but for entry_type and parent_entry you need to - # provide the full project id or number. - # - # You cannot use parent_entry in conjunction with other fields. - # - # Example filter expressions: - # - # * "entry_source.display_name=AnExampleDisplayName" - # * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - # * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - # entry_type=projects/another-project/locations/*" - # * "NOT entry_source.display_name=AnotherExampleDisplayName" - # * "parent_entry=projects/example-project/locations/us/entryGroups/example-entry-group/entries/example-entry" - class ListEntriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List Entries response. - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Dataplex::V1::Entry>] - # The list of entries under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListEntriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get Entry request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View to control which parts of an entry the service should - # return. - # @!attribute [rw] aspect_types - # @return [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # It only works for CUSTOM view. - # @!attribute [rw] paths - # @return [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. It only works for CUSTOM view. - class GetEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Lookup Entry request 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] view - # @return [::Google::Cloud::Dataplex::V1::EntryView] - # Optional. View to control which parts of an entry the service should - # return. - # @!attribute [rw] aspect_types - # @return [::Array<::String>] - # Optional. Limits the aspects returned to the provided aspect types. - # It only works for CUSTOM view. - # @!attribute [rw] paths - # @return [::Array<::String>] - # Optional. Limits the aspects returned to those associated with the provided - # paths within the Entry. It only works for CUSTOM view. - # @!attribute [rw] entry - # @return [::String] - # Required. The resource name of the Entry: - # `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - class LookupEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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 - # following form: `projects/{project}/locations/global`. - # @!attribute [rw] query - # @return [::String] - # Required. The query against which entries in scope should be matched. - # The query syntax is defined in [Search syntax for Dataplex Universal - # Catalog](https://cloud.google.com/dataplex/docs/search-syntax). - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of results in the search page. If <=0, then defaults - # to 10. Max limit for page_size is 1000. Throws an invalid argument for - # page_size > 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `SearchEntries` call. Provide - # this to retrieve the subsequent page. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specifies the ordering of results. - # Supported values are: - # - # * `relevance` - # * `last_modified_timestamp` - # * `last_modified_timestamp asc` - # @!attribute [rw] scope - # @return [::String] - # Optional. The scope under which the search should be operating. It must - # either be `organizations/` or `projects/`. If it is - # unspecified, it defaults to the organization where the project provided in - # `name` is located. - # @!attribute [rw] semantic_search - # @return [::Boolean] - # Optional. Specifies whether the search should understand the meaning and - # intent behind the query, rather than just matching keywords. - class SearchEntriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single result of a SearchEntries request. - # @!attribute [rw] linked_resource - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Linked resource name. - # @!attribute [rw] dataplex_entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # @!attribute [rw] snippets - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Dataplex::V1::SearchEntriesResult::Snippets] - # Snippets. - class SearchEntriesResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Snippets for the entry, contains HTML-style highlighting for - # matched tokens, will be used in UI. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] dataplex_entry - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Entry - class Snippets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Dataplex::V1::SearchEntriesResult>] - # The results matching the search query. - # @!attribute [rw] total_size - # @return [::Integer] - # The estimated total number of matching entries. This number isn't - # guaranteed to be accurate. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that the service couldn't reach. Search results don't include - # data from these locations. - class SearchEntriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An object that describes the values that you want to set for an entry and its - # attached aspects when you import metadata. Used when you run a metadata - # import job. See - # {::Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_job CreateMetadataJob}. - # - # You provide a collection of import items in a metadata import file. For more - # information about how to create a metadata import file, see [Metadata import - # file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). - # @!attribute [rw] entry - # @return [::Google::Cloud::Dataplex::V1::Entry] - # Information about an entry and its attached aspects. - # @!attribute [rw] entry_link - # @return [::Google::Cloud::Dataplex::V1::EntryLink] - # Information about the entry link. User should provide either one of the - # entry or entry_link. While providing entry_link, user should not - # provide update_mask and aspect_keys. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The fields to update, in paths that are relative to the `Entry` resource. - # Separate each field with a comma. - # - # In `FULL` entry sync mode, Dataplex Universal Catalog includes the paths of - # all of the fields for an entry that can be modified, including aspects. - # This means that Dataplex Universal Catalog replaces the existing entry with - # the entry in the metadata import file. All modifiable fields are updated, - # regardless of the fields that are listed in the update mask, and regardless - # of whether a field is present in the `entry` object. - # - # The `update_mask` field is ignored when an entry is created or re-created. - # - # In an aspect-only metadata job (when entry sync mode is `NONE`), set this - # value to `aspects`. - # - # - # Dataplex Universal Catalog also determines which entries and aspects to - # modify by comparing the values and timestamps that you provide in the - # metadata import file with the values and timestamps that exist in your - # project. For more information, see [Comparison - # logic](https://cloud.google.com/dataplex/docs/import-metadata#data-modification-logic). - # @!attribute [rw] aspect_keys - # @return [::Array<::String>] - # The aspects to modify. Supports the following syntaxes: - # - # * `{aspect_type_reference}`: matches aspects that belong to the specified - # aspect type and are attached directly to the entry. - # * `{aspect_type_reference}@{path}`: matches aspects that belong to the - # specified aspect type and path. - # * `{aspect_type_reference}@*` : matches aspects of the given type for all - # paths. - # * `*@path` : matches aspects of all types on the given path. - # - # Replace `{aspect_type_reference}` with a reference to the aspect type, in - # the format - # `{project_id_or_number}.{location_id}.{aspect_type_id}`. - # - # In `FULL` entry sync mode, if you leave this field empty, it is treated as - # specifying exactly those aspects that are present within the specified - # entry. Dataplex Universal Catalog implicitly adds the keys for all of the - # required aspects of an entry. - class ImportItem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create metadata job request. - # @!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_job - # @return [::Google::Cloud::Dataplex::V1::MetadataJob] - # Required. The metadata job resource. - # @!attribute [rw] metadata_job_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 CreateMetadataJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get metadata job request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the metadata job, in the format - # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. - class GetMetadataJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List metadata jobs request. - # @!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 jobs to return. The service might - # return fewer jobs than this value. If unspecified, at most 10 jobs are - # returned. The maximum value is 1,000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token received from a previous `ListMetadataJobs` call. - # Provide this token to retrieve the subsequent page of results. When - # paginating, all other parameters that are provided to the - # `ListMetadataJobs` request must match the call that provided the page - # token. - # @!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 ListMetadataJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List metadata jobs response. - # @!attribute [rw] metadata_jobs - # @return [::Array<::Google::Cloud::Dataplex::V1::MetadataJob>] - # Metadata jobs 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_locations - # @return [::Array<::String>] - # Locations that the service couldn't reach. - class ListMetadataJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cancel metadata job request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the job, in the format - # `projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}` - class CancelMetadataJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A metadata job resource. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the resource that the configuration is - # applied to, in the format - # `projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}`. - # @!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 [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the metadata job was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the metadata job was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::Type] - # Required. Metadata job type. - # @!attribute [rw] import_spec - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec] - # Import job specification. - # - # Note: The following fields are mutually exclusive: `import_spec`, `export_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_spec - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ExportJobSpec] - # Export job specification. - # - # Note: The following fields are mutually exclusive: `export_spec`, `import_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] import_result - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobResult] - # Output only. Import job result. - # - # Note: The following fields are mutually exclusive: `import_result`, `export_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] export_result - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ExportJobResult] - # Output only. Export job result. - # - # Note: The following fields are mutually exclusive: `export_result`, `import_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] status - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::Status] - # Output only. Metadata job status. - class MetadataJob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Results from a metadata import job. - # @!attribute [r] deleted_entries - # @return [::Integer] - # Output only. The total number of entries that were deleted. - # @!attribute [r] updated_entries - # @return [::Integer] - # Output only. The total number of entries that were updated. - # @!attribute [r] created_entries - # @return [::Integer] - # Output only. The total number of entries that were created. - # @!attribute [r] unchanged_entries - # @return [::Integer] - # Output only. The total number of entries that were unchanged. - # @!attribute [r] recreated_entries - # @return [::Integer] - # Output only. The total number of entries that were recreated. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the status was updated. - # @!attribute [r] deleted_entry_links - # @return [::Integer] - # Output only. The total number of entry links that were successfully - # deleted. - # @!attribute [r] created_entry_links - # @return [::Integer] - # Output only. The total number of entry links that were successfully - # created. - # @!attribute [r] unchanged_entry_links - # @return [::Integer] - # Output only. The total number of entry links that were left unchanged. - class ImportJobResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Summary results from a metadata export job. The results are a snapshot of - # the metadata at the time when the job was created. The exported entries are - # saved to a Cloud Storage bucket. - # @!attribute [r] exported_entries - # @return [::Integer] - # Output only. The number of entries that were exported. - # @!attribute [r] error_message - # @return [::String] - # Output only. The error message if the metadata export job failed. - class ExportJobResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Job specification for a metadata import job. - # - # You can run the following kinds of metadata import jobs: - # - # * Full sync of entries with incremental import of their aspects. - # Supported for custom entries. - # * Incremental import of aspects only. Supported for aspects that belong - # to custom entries and system entries. For custom entries, you can modify - # both optional aspects and required aspects. For system entries, you can - # modify optional aspects. - # @!attribute [rw] source_storage_uri - # @return [::String] - # Optional. The URI of a Cloud Storage bucket or folder (beginning with - # `gs://` and ending with `/`) that contains the metadata import files for - # this job. - # - # A metadata import file defines the values to set for each of the entries - # and aspects in a metadata import job. For more information about how to - # create a metadata import file and the file requirements, see [Metadata - # import - # file](https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file). - # - # You can provide multiple metadata import files in the same metadata job. - # The bucket or folder must contain at least one metadata import file, in - # JSON Lines format (either `.json` or `.jsonl` file extension). - # - # In `FULL` entry sync mode, don't save the metadata import file in a - # folder named `SOURCE_STORAGE_URI/deletions/`. - # - # **Caution**: If the metadata import file contains no data, all entries - # and aspects that belong to the job's scope are deleted. - # @!attribute [rw] source_create_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time when the process that created the metadata import - # files began. - # @!attribute [rw] scope - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec::ImportJobScope] - # Required. A boundary on the scope of impact that the metadata import job - # can have. - # @!attribute [rw] entry_sync_mode - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec::SyncMode] - # Required. The sync mode for entries. - # @!attribute [rw] aspect_sync_mode - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec::SyncMode] - # Required. The sync mode for aspects. - # @!attribute [rw] log_level - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ImportJobSpec::LogLevel] - # Optional. The level of logs to write to Cloud Logging for this job. - # - # Debug-level logs provide highly-detailed information for - # troubleshooting, but their increased verbosity could incur [additional - # costs](https://cloud.google.com/stackdriver/pricing) that might not be - # merited for all jobs. - # - # If unspecified, defaults to `INFO`. - class ImportJobSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A boundary on the scope of impact that the metadata import job can have. - # @!attribute [rw] entry_groups - # @return [::Array<::String>] - # Required. The entry groups that are in scope for the import job, - # specified as relative resource names in the format - # `projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}`. - # Only entries and aspects that belong to the specified entry groups are - # affected by the job. - # - # The entry groups and the job must be in the same location. - # @!attribute [rw] entry_types - # @return [::Array<::String>] - # Required. The entry types that are in scope for the import job, - # specified as relative resource names in the format - # `projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}`. - # The job modifies only the entries and aspects that belong to these - # entry types. - # - # If the metadata import file attempts to modify an entry whose type - # isn't included in this list, the import job is halted before modifying - # any entries or aspects. - # - # The location of an entry type must either match the location of the - # job, or the entry type must be global. - # @!attribute [rw] aspect_types - # @return [::Array<::String>] - # Optional. The aspect types that are in scope for the import job, - # specified as relative resource names in the format - # `projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - # The job modifies only the aspects that belong to these aspect types. - # - # This field is required when creating an aspect-only import job. - # - # If the metadata import file attempts to modify an aspect whose type - # isn't included in this list, the import job is halted before modifying - # any entries or aspects. - # - # The location of an aspect type must either match the location of the - # job, or the aspect type must be global. - # @!attribute [rw] glossaries - # @return [::Array<::String>] - # Optional. The glossaries that are in scope for the import job, - # specified as relative resource names in the format - # `projects/{project_number_or_id}/locations/{location_id}/glossaries/{glossary_id}`. - # - # While importing Business Glossary entries, the user must - # provide glossaries. While importing entries, the user does not have to - # provide glossaries. If the metadata import file attempts to modify - # Business Glossary entries whose glossary isn't included in this list, - # the import job will skip those entries. - # - # The location of a glossary must either match the location of the - # job, or the glossary must be global. - # @!attribute [rw] entry_link_types - # @return [::Array<::String>] - # Optional. The entry link types that are in scope for the import job, - # specified as relative resource names in the format - # `projects/{project_number_or_id}/locations/{location_id}/entryLinkTypes/{entry_link_type_id}`. - # The job modifies only the entryLinks that belong to these entry link - # types. - # - # If the metadata import file attempts to create or delete an entry link - # whose entry link type isn't included in this list, the import job will - # skip those entry links. - # @!attribute [rw] referenced_entry_scopes - # @return [::Array<::String>] - # Optional. Defines the scope of entries that can be referenced in the - # entry links. - # - # Currently, projects are supported as valid scopes. - # Format: `projects/{project_number_or_id}` - # - # If the metadata import file attempts to create an entry link - # which references an entry that is not in the scope, the import job will - # skip that entry link. - class ImportJobScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies how the entries and aspects in a metadata import job are - # updated. For more information, see [Sync - # mode](https://cloud.google.com/dataplex/docs/import-metadata#sync-mode). - module SyncMode - # Sync mode unspecified. - SYNC_MODE_UNSPECIFIED = 0 - - # All resources in the job's scope are modified. If a resource exists in - # Dataplex Universal Catalog but isn't included in the metadata import - # file, the resource is deleted when you run the metadata job. Use this - # mode to perform a full sync of the set of entries in the job scope. - # - # This sync mode is supported for entries. - FULL = 1 - - # Only the resources that are explicitly included in the - # metadata import file are modified. Use this mode to modify a subset of - # resources while leaving unreferenced resources unchanged. - # - # This sync mode is supported for aspects. - INCREMENTAL = 2 - - # If entry sync mode is `NONE`, then aspects are modified according - # to the aspect sync mode. Other metadata that belongs to entries in the - # job's scope isn't modified. - # - # This sync mode is supported for entries. - NONE = 3 - end - - # The level of logs to write to Cloud Logging for this job. - module LogLevel - # Log level unspecified. - LOG_LEVEL_UNSPECIFIED = 0 - - # Debug-level logging. Captures detailed logs for each import item. Use - # debug-level logging to troubleshoot issues with specific import items. - # For example, use debug-level logging to identify resources that are - # missing from the job scope, entries or aspects that don't conform to - # the associated entry type or aspect type, or other misconfigurations - # with the metadata import file. - # - # Depending on the size of your metadata job and the number of logs that - # are generated, debug-level logging might incur - # [additional costs](https://cloud.google.com/stackdriver/pricing). - DEBUG = 1 - - # Info-level logging. Captures logs at the overall job level. Includes - # aggregate logs about import items, but doesn't specify which import - # item has an error. - INFO = 2 - end - end - - # Job specification for a metadata export job. - # @!attribute [rw] scope - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::ExportJobSpec::ExportJobScope] - # Required. The scope of the export job. - # @!attribute [rw] output_path - # @return [::String] - # Required. The root path of the Cloud Storage bucket to export the - # metadata to, in the format `gs://{bucket}/`. You can optionally specify a - # custom prefix after the bucket name, in the format - # `gs://{bucket}/{prefix}/`. The maximum length of the custom prefix is 128 - # characters. Dataplex Universal Catalog constructs the object path for the - # exported files by using the bucket name and prefix that you provide, - # followed by a system-generated path. - # - # The bucket must be in the same VPC Service Controls perimeter as the job. - class ExportJobSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The scope of the export job. - # @!attribute [rw] organization_level - # @return [::Boolean] - # Whether the metadata export job is an organization-level export job. - # - # - If `true`, the job exports the entries from the same organization and - # VPC Service Controls perimeter as the job. The project that the job - # belongs to determines the VPC Service Controls perimeter. If you set - # the job scope to be at the organization level, then don't provide a - # list of projects or entry groups. - # - If `false`, you must specify a list of projects or a list of entry - # groups whose entries you want to export. - # - # The default is `false`. - # @!attribute [rw] projects - # @return [::Array<::String>] - # The projects whose metadata you want to export, in the format - # `projects/{project_id_or_number}`. Only the entries from - # the specified projects are exported. - # - # The projects must be in the same organization and VPC Service Controls - # perimeter as the job. - # - # If you set the job scope to be a list of projects, then set the - # organization-level export flag to false and don't provide a list of - # entry groups. - # @!attribute [rw] entry_groups - # @return [::Array<::String>] - # The entry groups whose metadata you want to export, in the format - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # Only the entries in the specified entry groups are exported. - # - # The entry groups must be in the same location and the same VPC Service - # Controls perimeter as the job. - # - # If you set the job scope to be a list of entry groups, then set the - # organization-level export flag to false and don't provide a list of - # projects. - # @!attribute [rw] entry_types - # @return [::Array<::String>] - # The entry types that are in scope for the export job, 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 affected by - # the job. - # @!attribute [rw] aspect_types - # @return [::Array<::String>] - # The aspect types that are in scope for the export job, specified as - # relative resource names in the format - # `projects/{project_id_or_number}/locations/{location}/aspectTypes/{aspect_type_id}`. - # Only aspects that belong to the specified aspect types are affected by - # the job. - class ExportJobScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Metadata job status. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::MetadataJob::Status::State] - # Output only. State of the metadata job. - # @!attribute [r] message - # @return [::String] - # Output only. Message relating to the progression of a metadata job. - # @!attribute [r] completion_percent - # @return [::Integer] - # Output only. Progress tracking. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the status was updated. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of a metadata job. - module State - # State unspecified. - STATE_UNSPECIFIED = 0 - - # The job is queued. - QUEUED = 1 - - # The job is running. - RUNNING = 2 - - # The job is being canceled. - CANCELING = 3 - - # The job is canceled. - CANCELED = 4 - - # The job succeeded. - SUCCEEDED = 5 - - # The job failed. - FAILED = 6 - - # The job completed with some errors. - SUCCEEDED_WITH_ERRORS = 7 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata job type. - module Type - # Unspecified. - TYPE_UNSPECIFIED = 0 - - # Import job. - IMPORT = 1 - - # Export job. - EXPORT = 2 - end - end - - # EntryLink represents a link between two Entries. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. Identifier. The relative resource name of the Entry - # Link, of the form: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}` - # @!attribute [rw] entry_link_type - # @return [::String] - # Required. Immutable. Relative resource name of the Entry Link Type used to - # create this Entry Link. For example: - # - # - Entry link between synonym terms in a glossary: - # `projects/dataplex-types/locations/global/entryLinkTypes/synonym` - # - Entry link between related terms in a glossary: - # `projects/dataplex-types/locations/global/entryLinkTypes/related` - # - Entry link between glossary terms and data assets: - # `projects/dataplex-types/locations/global/entryLinkTypes/definition` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Entry Link was created. - # @!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. 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 - - # Reference to the Entry that is linked through the Entry Link. - # @!attribute [rw] name - # @return [::String] - # Required. Immutable. The relative resource name of the referenced Entry, - # of the form: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` - # @!attribute [rw] path - # @return [::String] - # Immutable. The path in the Entry that is referenced in the Entry Link. - # Empty path denotes that the Entry itself is referenced in the Entry - # Link. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::EntryLink::EntryReference::Type] - # Required. Immutable. The reference type of the Entry. - class EntryReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reference type of the Entry. - module Type - # Unspecified reference type. Implies that the Entry is referenced - # in a non-directional Entry Link. - UNSPECIFIED = 0 - - # The Entry is referenced as the source of the directional Entry Link. - SOURCE = 2 - - # The Entry is referenced as the target of the directional Entry Link. - 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. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent Entry Group: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - # @!attribute [rw] entry_link_id - # @return [::String] - # Required. Entry Link 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 EntryGroup. - # @!attribute [rw] entry_link - # @return [::Google::Cloud::Dataplex::V1::EntryLink] - # Required. Entry Link resource. - class CreateEntryLinkRequest - include ::Google::Protobuf::MessageExts - 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] - # Required. The resource name of the Entry Link: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. - class DeleteEntryLinkRequest - include ::Google::Protobuf::MessageExts - 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] - # Required. The resource name of the Entry Link: - # `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`. - class GetEntryLinkRequest - include ::Google::Protobuf::MessageExts - 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. - ENTRY_VIEW_UNSPECIFIED = 0 - - # Returns entry only, without aspects. - BASIC = 1 - - # Returns all required aspects as well as the keys of all non-required - # aspects. - FULL = 2 - - # Returns aspects matching custom fields in GetEntryRequest. If the number of - # aspects exceeds 100, the first 100 will be returned. - CUSTOM = 3 - - # Returns all aspects. If the number of aspects exceeds 100, the first - # 100 will be returned. - ALL = 4 - end - - # Denotes the transfer status of a resource. It is unspecified for resources - # created from Dataplex API. - module TransferStatus - # The default value. It is set for resources that were not subject for - # migration from Data Catalog service. - TRANSFER_STATUS_UNSPECIFIED = 0 - - # Indicates that a resource was migrated from Data Catalog service but it - # hasn't been transferred yet. In particular the resource cannot be updated - # from Dataplex API. - TRANSFER_STATUS_MIGRATED = 1 - - # Indicates that a resource was transferred from Data Catalog service. The - # resource can only be updated from Dataplex API. - TRANSFER_STATUS_TRANSFERRED = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/cmek.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/cmek.rb deleted file mode 100644 index 0118c1948ccb..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/cmek.rb +++ /dev/null @@ -1,216 +0,0 @@ -# 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 Resource designed to manage encryption configurations for customers to - # support Customer Managed Encryption Keys (CMEK). - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the EncryptionConfig. - # Format: - # organizations/\\{organization}/locations/\\{location}/encryptionConfigs/\\{encryption_config} - # Global location is not supported. - # @!attribute [rw] key - # @return [::String] - # Optional. If a key is chosen, it means that the customer is using CMEK. - # If a key is not chosen, it means that the customer is using Google managed - # encryption. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Encryption configuration was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the Encryption configuration was last updated. - # @!attribute [r] encryption_state - # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig::EncryptionState] - # Output only. The state of encryption of the databases. - # @!attribute [rw] etag - # @return [::String] - # Etag of the EncryptionConfig. This is a strong etag. - # @!attribute [r] failure_details - # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig::FailureDetails] - # Output only. Details of the failure if anything related to Cmek db fails. - # @!attribute [rw] enable_metastore_encryption - # @return [::Boolean] - # Optional. Represent the state of CMEK opt-in for metastore. - class EncryptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details of the failure if anything related to Cmek db fails. - # @!attribute [r] error_code - # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig::FailureDetails::ErrorCode] - # Output only. The error code for the failure. - # @!attribute [r] error_message - # @return [::String] - # Output only. The error message will be shown to the user. Set only if the - # error code is REQUIRE_USER_ACTION. - class FailureDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Error code for the failure if anything related to Cmek db fails. - module ErrorCode - # The error code is not specified - UNKNOWN = 0 - - # Error because of internal server error, will be retried automatically. - INTERNAL_ERROR = 1 - - # User action is required to resolve the error. - REQUIRE_USER_ACTION = 2 - end - end - - # State of encryption of the databases when EncryptionConfig is created or - # updated. - module EncryptionState - # State is not specified. - ENCRYPTION_STATE_UNSPECIFIED = 0 - - # The encryption state of the database when the EncryptionConfig is created - # or updated. If the encryption fails, it is retried indefinitely and the - # state is shown as ENCRYPTING. - ENCRYPTING = 1 - - # The encryption of data has completed successfully. - COMPLETED = 2 - - # The encryption of data has failed. - # The state is set to FAILED when the encryption fails due to reasons like - # permission issues, invalid key etc. - FAILED = 3 - end - end - - # Create EncryptionConfig Request - # @!attribute [rw] parent - # @return [::String] - # Required. The location at which the EncryptionConfig is to be created. - # @!attribute [rw] encryption_config_id - # @return [::String] - # Required. The ID of the - # {::Google::Cloud::Dataplex::V1::EncryptionConfig EncryptionConfig} to create. - # Currently, only a value of "default" is supported. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] - # Required. The EncryptionConfig to create. - class CreateEncryptionConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get EncryptionConfig Request - # @!attribute [rw] name - # @return [::String] - # Required. The name of the EncryptionConfig to fetch. - class GetEncryptionConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update EncryptionConfig Request - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::Dataplex::V1::EncryptionConfig] - # Required. The EncryptionConfig to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Mask of fields to update. - # The service treats an omitted field mask as an implied field mask - # equivalent to all fields that are populated (have a non-empty value). - class UpdateEncryptionConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete EncryptionConfig Request - # @!attribute [rw] name - # @return [::String] - # Required. The name of the EncryptionConfig to delete. - # @!attribute [rw] etag - # @return [::String] - # Optional. Etag of the EncryptionConfig. This is a strong etag. - class DeleteEncryptionConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List EncryptionConfigs Request - # @!attribute [rw] parent - # @return [::String] - # Required. The location for which the EncryptionConfig is to be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of EncryptionConfigs to return. The service may - # return fewer than this value. If unspecified, at most 10 EncryptionConfigs - # 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 `ListEncryptionConfigs` call. - # Provide this to retrieve the subsequent page. When paginating, the - # parameters - filter and order_by provided to `ListEncryptionConfigs` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the EncryptionConfigs to be returned. - # Using bare literals: (These values will be matched anywhere it may appear - # in the object's field values) - # * filter=some_value - # Using fields: (These values will be matched only in the specified field) - # * filter=some_field=some_value - # Supported fields: - # * name, key, create_time, update_time, encryption_state - # Example: - # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config - # conjunctions: (AND, OR, NOT) - # * filter=name=organizations/123/locations/us-central1/encryptionConfigs/test-config - # AND mode=CMEK - # logical operators: (>, <, >=, <=, !=, =, :), - # * filter=create_time>2024-05-01T00:00:00.000Z - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListEncryptionConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List EncryptionConfigs Response - # @!attribute [rw] encryption_configs - # @return [::Array<::Google::Cloud::Dataplex::V1::EncryptionConfig>] - # The list of EncryptionConfigs under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEncryptionConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_discovery.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_discovery.rb deleted file mode 100644 index 9bc271dacaf3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_discovery.rb +++ /dev/null @@ -1,222 +0,0 @@ -# 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 - # Spec for a data discovery scan. - # @!attribute [rw] bigquery_publishing_config - # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::BigQueryPublishingConfig] - # Optional. Configuration for metadata publishing. - # @!attribute [rw] storage_config - # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::StorageConfig] - # Cloud Storage related configurations. - class DataDiscoverySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes BigQuery publishing configurations. - # @!attribute [rw] table_type - # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::BigQueryPublishingConfig::TableType] - # Optional. Determines whether to publish discovered tables as BigLake - # external tables or non-BigLake external tables. - # @!attribute [rw] connection - # @return [::String] - # Optional. The BigQuery connection used to create BigLake tables. - # Must be in the form - # `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - # @!attribute [rw] location - # @return [::String] - # Optional. The location of the BigQuery dataset to publish BigLake - # external or non-BigLake external tables to. - # 1. If the Cloud Storage bucket is located in a multi-region bucket, then - # BigQuery dataset can be in the same multi-region bucket or any single - # region that is included in the same multi-region bucket. The datascan can - # be created in any single region that is included in the same multi-region - # bucket - # 2. If the Cloud Storage bucket is located in a dual-region bucket, then - # BigQuery dataset can be located in regions that are included in the - # dual-region bucket, or in a multi-region that includes the dual-region. - # The datascan can be created in any single region that is included in the - # same dual-region bucket. - # 3. If the Cloud Storage bucket is located in a single region, then - # BigQuery dataset can be in the same single region or any multi-region - # bucket that includes the same single region. The datascan will be created - # in the same single region as the bucket. - # 4. If the BigQuery dataset is in single region, it must be in the same - # single region as the datascan. - # - # For supported values, refer to - # https://cloud.google.com/bigquery/docs/locations#supported_locations. - # @!attribute [rw] project - # @return [::String] - # Optional. The project of the BigQuery dataset to publish BigLake external - # or non-BigLake external tables to. If not specified, the project of the - # Cloud Storage bucket will be used. The format is - # "projects/\\{project_id_or_number}". - class BigQueryPublishingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Determines how discovered tables are published. - module TableType - # Table type unspecified. - TABLE_TYPE_UNSPECIFIED = 0 - - # Default. Discovered tables are published as BigQuery external tables - # whose data is accessed using the credentials of the user querying the - # table. - EXTERNAL = 1 - - # Discovered tables are published as BigLake external tables whose data - # is accessed using the credentials of the associated BigQuery - # connection. - BIGLAKE = 2 - end - end - - # Configurations related to Cloud Storage as the data source. - # @!attribute [rw] include_patterns - # @return [::Array<::String>] - # Optional. Defines the data to include during discovery when only a subset - # of the data should be considered. Provide a list of patterns that - # identify the data to include. For Cloud Storage bucket assets, these - # patterns are interpreted as glob patterns used to match object names. For - # BigQuery dataset assets, these patterns are interpreted as patterns to - # match table names. - # @!attribute [rw] exclude_patterns - # @return [::Array<::String>] - # Optional. Defines the data to exclude during discovery. Provide a list of - # patterns that identify the data to exclude. For Cloud Storage bucket - # assets, these patterns are interpreted as glob patterns used to match - # object names. For BigQuery dataset assets, these patterns are interpreted - # as patterns to match table names. - # @!attribute [rw] csv_options - # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::StorageConfig::CsvOptions] - # Optional. Configuration for CSV data. - # @!attribute [rw] json_options - # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec::StorageConfig::JsonOptions] - # Optional. Configuration for JSON data. - class StorageConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes CSV and similar semi-structured data formats. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter that is used to separate values. The default is - # `,` (comma). - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] type_inference_disabled - # @return [::Boolean] - # Optional. Whether to disable the inference of data types for CSV data. - # If true, all columns are registered as strings. - # @!attribute [rw] quote - # @return [::String] - # Optional. The character used to quote column values. Accepts `"` - # (double quotation mark) or `'` (single quotation mark). If unspecified, - # defaults to `"` (double quotation mark). - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] type_inference_disabled - # @return [::Boolean] - # Optional. Whether to disable the inference of data types for JSON data. - # If true, all columns are registered as their primitive types - # (strings, number, or boolean). - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # The output of a data discovery scan. - # @!attribute [r] bigquery_publishing - # @return [::Google::Cloud::Dataplex::V1::DataDiscoveryResult::BigQueryPublishing] - # Output only. Configuration for metadata publishing. - # @!attribute [r] scan_statistics - # @return [::Google::Cloud::Dataplex::V1::DataDiscoveryResult::ScanStatistics] - # Output only. Describes result statistics of a data scan discovery job. - class DataDiscoveryResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes BigQuery publishing configurations. - # @!attribute [r] dataset - # @return [::String] - # Output only. The BigQuery dataset the discovered tables are published to. - # @!attribute [r] location - # @return [::String] - # Output only. The location of the BigQuery publishing dataset. - class BigQueryPublishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes result statistics of a data scan discovery job. - # @!attribute [rw] scanned_file_count - # @return [::Integer] - # The number of files scanned. - # @!attribute [rw] data_processed_bytes - # @return [::Integer] - # The data processed in bytes. - # @!attribute [rw] files_excluded - # @return [::Integer] - # The number of files excluded. - # @!attribute [rw] tables_created - # @return [::Integer] - # The number of tables created. - # @!attribute [rw] tables_deleted - # @return [::Integer] - # The number of tables deleted. - # @!attribute [rw] tables_updated - # @return [::Integer] - # The number of tables updated. - # @!attribute [rw] filesets_created - # @return [::Integer] - # The number of filesets created. - # @!attribute [rw] filesets_deleted - # @return [::Integer] - # The number of filesets deleted. - # @!attribute [rw] filesets_updated - # @return [::Integer] - # The number of filesets updated. - class ScanStatistics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb deleted file mode 100644 index 1ac56cf92238..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_documentation.rb +++ /dev/null @@ -1,124 +0,0 @@ -# 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 - # 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. - # @!attribute [r] table_result - # @return [::Google::Cloud::Dataplex::V1::DataDocumentationResult::TableResult] - # Output only. Table result for insights. - class DataDocumentationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Generated metadata about the table. - # @!attribute [r] name - # @return [::String] - # Output only. The service-qualified full resource name of the cloud - # resource. Ex: - # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - # @!attribute [r] overview - # @return [::String] - # Output only. Generated description of the table. - # @!attribute [r] schema - # @return [::Google::Cloud::Dataplex::V1::DataDocumentationResult::Schema] - # Output only. Schema of the table with generated metadata of the columns - # in the schema. - # @!attribute [r] queries - # @return [::Array<::Google::Cloud::Dataplex::V1::DataDocumentationResult::Query>] - # Output only. Sample SQL queries for the table. - class TableResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A sample SQL query in data documentation. - # @!attribute [r] sql - # @return [::String] - # Output only. The SQL query string which can be executed. - # @!attribute [r] description - # @return [::String] - # Output only. The description for the query. - class Query - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Schema of the table with generated metadata of columns. - # @!attribute [r] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::DataDocumentationResult::Field>] - # Output only. The list of columns. - class Schema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Column of a table with generated metadata and nested fields. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the column. - # @!attribute [r] description - # @return [::String] - # Output only. Generated description for columns and fields. - # @!attribute [r] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::DataDocumentationResult::Field>] - # Output only. Nested fields. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb deleted file mode 100644 index 9f61ed0c8218..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_profile.rb +++ /dev/null @@ -1,340 +0,0 @@ -# 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 - # DataProfileScan related setting. - # @!attribute [rw] sampling_percent - # @return [::Float] - # Optional. The percentage of the records to be selected from the dataset for - # DataScan. - # - # * Value can range between 0.0 and 100.0 with up to 3 significant decimal - # digits. - # * Sampling is not applied if `sampling_percent` is not specified, 0 or - # 100. - # @!attribute [rw] row_filter - # @return [::String] - # Optional. A filter applied to all rows in a single DataScan job. - # The filter needs to be a valid SQL expression for a WHERE clause in - # BigQuery standard SQL syntax. - # Example: col1 >= 0 AND col2 < 10 - # @!attribute [rw] post_scan_actions - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions] - # Optional. Actions to take upon job completion.. - # @!attribute [rw] include_fields - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] - # Optional. The fields to include in data profile. - # - # If not specified, all fields at the time of profile scan job execution are - # included, except for ones listed in `exclude_fields`. - # @!attribute [rw] exclude_fields - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::SelectedFields] - # Optional. The fields to exclude from data profile. - # - # If specified, the fields will be excluded from data profile, regardless of - # `include_fields` value. - # @!attribute [rw] catalog_publishing_enabled - # @return [::Boolean] - # Optional. If set, the latest DataScan job result will be published as - # Dataplex Universal Catalog metadata. - class DataProfileSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of post scan actions of DataProfileScan job. - # @!attribute [rw] bigquery_export - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec::PostScanActions::BigQueryExport] - # Optional. If set, results will be exported to the provided BigQuery - # table. - class PostScanActions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of BigQuery export post scan action. - # @!attribute [rw] results_table - # @return [::String] - # Optional. The BigQuery table to export DataProfileScan results to. - # Format: - # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - class BigQueryExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The specification for fields to include or exclude in data profile scan. - # @!attribute [rw] field_names - # @return [::Array<::String>] - # Optional. Expected input is a list of fully qualified names of fields as - # in the schema. - # - # Only top-level field names for nested fields are supported. - # For instance, if 'x' is of nested field type, listing 'x' is supported - # but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - # 'x'. - class SelectedFields - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # DataProfileResult defines the output of DataProfileScan. Each field of the - # table will have field type specific profile result. - # @!attribute [r] row_count - # @return [::Integer] - # Output only. The count of rows scanned. - # @!attribute [r] profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile] - # Output only. The profile information per field. - # @!attribute [r] scanned_data - # @return [::Google::Cloud::Dataplex::V1::ScannedData] - # Output only. The data scanned for this result. - # @!attribute [r] post_scan_actions_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult] - # Output only. The result of post scan actions. - # @!attribute [r] catalog_publishing_status - # @return [::Google::Cloud::Dataplex::V1::DataScanCatalogPublishingStatus] - # Output only. The status of publishing the data scan as Dataplex Universal - # Catalog metadata. - class DataProfileResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains name, type, mode and field type specific profile information. - # @!attribute [r] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field>] - # Output only. List of fields with structural and profile information for - # each field. - class Profile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A field within a table. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the field. - # @!attribute [r] type - # @return [::String] - # Output only. The data type retrieved from the schema of the data - # source. For instance, for a BigQuery native table, it is the [BigQuery - # Table - # Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - # For a Dataplex Universal Catalog Entity, it is the [Entity - # Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - # @!attribute [r] mode - # @return [::String] - # Output only. The mode of the field. Possible values include: - # - # * REQUIRED, if it is a required field. - # * NULLABLE, if it is an optional field. - # * REPEATED, if it is a repeated field. - # @!attribute [r] profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo] - # Output only. Profile information for the corresponding field. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The profile information for each field type. - # @!attribute [r] null_ratio - # @return [::Float] - # Output only. Ratio of rows with null value against total scanned - # rows. - # @!attribute [r] distinct_ratio - # @return [::Float] - # Output only. Ratio of rows with distinct values against total scanned - # rows. Not available for complex non-groupable field type, including - # RECORD, ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE - # mode. - # @!attribute [r] top_n_values - # @return [::Array<::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::TopNValue>] - # Output only. The list of top N non-null values, frequency and ratio - # with which they occur in the scanned data. N is 10 or equal to the - # number of distinct values in the field, whichever is smaller. Not - # available for complex non-groupable field type, including RECORD, - # ARRAY, GEOGRAPHY, and JSON, as well as fields with REPEATABLE mode. - # @!attribute [rw] string_profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::StringFieldInfo] - # String type field information. - # - # Note: The following fields are mutually exclusive: `string_profile`, `integer_profile`, `double_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] integer_profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::IntegerFieldInfo] - # Integer type field information. - # - # Note: The following fields are mutually exclusive: `integer_profile`, `string_profile`, `double_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] double_profile - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::Profile::Field::ProfileInfo::DoubleFieldInfo] - # Double type field information. - # - # Note: The following fields are mutually exclusive: `double_profile`, `string_profile`, `integer_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ProfileInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The profile information for a string type field. - # @!attribute [r] min_length - # @return [::Integer] - # Output only. Minimum length of non-null values in the scanned data. - # @!attribute [r] max_length - # @return [::Integer] - # Output only. Maximum length of non-null values in the scanned data. - # @!attribute [r] average_length - # @return [::Float] - # Output only. Average length of non-null values in the scanned data. - class StringFieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The profile information for an integer type field. - # @!attribute [r] average - # @return [::Float] - # Output only. Average of non-null values in the scanned data. NaN, - # if the field has a NaN. - # @!attribute [r] standard_deviation - # @return [::Float] - # Output only. Standard deviation of non-null values in the scanned - # data. NaN, if the field has a NaN. - # @!attribute [r] min - # @return [::Integer] - # Output only. Minimum of non-null values in the scanned data. NaN, - # if the field has a NaN. - # @!attribute [r] quartiles - # @return [::Array<::Integer>] - # Output only. A quartile divides the number of data points into four - # parts, or quarters, of more-or-less equal size. Three main - # quartiles used are: The first quartile (Q1) splits off the lowest - # 25% of data from the highest 75%. It is also known as the lower or - # 25th empirical quartile, as 25% of the data is below this point. - # The second quartile (Q2) is the median of a data set. So, 50% of - # the data lies below this point. The third quartile (Q3) splits off - # the highest 25% of data from the lowest 75%. It is known as the - # upper or 75th empirical quartile, as 75% of the data lies below - # this point. Here, the quartiles is provided as an ordered list of - # approximate quartile values for the scanned data, occurring in - # order Q1, median, Q3. - # @!attribute [r] max - # @return [::Integer] - # Output only. Maximum of non-null values in the scanned data. NaN, - # if the field has a NaN. - class IntegerFieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The profile information for a double type field. - # @!attribute [r] average - # @return [::Float] - # Output only. Average of non-null values in the scanned data. NaN, - # if the field has a NaN. - # @!attribute [r] standard_deviation - # @return [::Float] - # Output only. Standard deviation of non-null values in the scanned - # data. NaN, if the field has a NaN. - # @!attribute [r] min - # @return [::Float] - # Output only. Minimum of non-null values in the scanned data. NaN, - # if the field has a NaN. - # @!attribute [r] quartiles - # @return [::Array<::Float>] - # Output only. A quartile divides the number of data points into four - # parts, or quarters, of more-or-less equal size. Three main - # quartiles used are: The first quartile (Q1) splits off the lowest - # 25% of data from the highest 75%. It is also known as the lower or - # 25th empirical quartile, as 25% of the data is below this point. - # The second quartile (Q2) is the median of a data set. So, 50% of - # the data lies below this point. The third quartile (Q3) splits off - # the highest 25% of data from the lowest 75%. It is known as the - # upper or 75th empirical quartile, as 75% of the data lies below - # this point. Here, the quartiles is provided as an ordered list of - # quartile values for the scanned data, occurring in order Q1, - # median, Q3. - # @!attribute [r] max - # @return [::Float] - # Output only. Maximum of non-null values in the scanned data. NaN, - # if the field has a NaN. - class DoubleFieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Top N non-null values in the scanned data. - # @!attribute [r] value - # @return [::String] - # Output only. String value of a top N non-null value. - # @!attribute [r] count - # @return [::Integer] - # Output only. Count of the corresponding value in the scanned data. - # @!attribute [r] ratio - # @return [::Float] - # Output only. Ratio of the corresponding value in the field against - # the total number of rows in the scanned data. - class TopNValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - - # The result of post scan actions of DataProfileScan job. - # @!attribute [r] bigquery_export_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult] - # Output only. The result of BigQuery export post scan action. - class PostScanActionsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of BigQuery export post scan action. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult::PostScanActionsResult::BigQueryExportResult::State] - # Output only. Execution state for the BigQuery exporting. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the BigQuery exporting. - class BigQueryExportResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the exporting. - module State - # The exporting state is unspecified. - STATE_UNSPECIFIED = 0 - - # The exporting completed successfully. - SUCCEEDED = 1 - - # The exporting is no longer running due to an error. - FAILED = 2 - - # The exporting is skipped due to no valid scan result to export - # (usually caused by scan failed). - SKIPPED = 3 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb deleted file mode 100644 index 7a4c569b5ca3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_quality.rb +++ /dev/null @@ -1,690 +0,0 @@ -# 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 - # DataQualityScan related setting. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] - # Required. The list of rules to evaluate against a data source. At least one - # rule is required. - # @!attribute [rw] sampling_percent - # @return [::Float] - # Optional. The percentage of the records to be selected from the dataset for - # DataScan. - # - # * Value can range between 0.0 and 100.0 with up to 3 significant decimal - # digits. - # * Sampling is not applied if `sampling_percent` is not specified, 0 or - # 100. - # @!attribute [rw] row_filter - # @return [::String] - # Optional. A filter applied to all rows in a single DataScan job. - # The filter needs to be a valid SQL expression for a [WHERE clause in - # GoogleSQL - # syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#where_clause). - # - # Example: col1 >= 0 AND col2 < 10 - # @!attribute [rw] post_scan_actions - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions] - # Optional. Actions to take upon job completion. - # @!attribute [rw] catalog_publishing_enabled - # @return [::Boolean] - # Optional. If set, the latest DataScan job result will be published as - # Dataplex Universal Catalog metadata. - class DataQualitySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of post scan actions of DataQualityScan. - # @!attribute [rw] bigquery_export - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::BigQueryExport] - # Optional. If set, results will be exported to the provided BigQuery - # table. - # @!attribute [rw] notification_report - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::NotificationReport] - # Optional. If set, results will be sent to the provided notification - # receipts upon triggers. - class PostScanActions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration of BigQuery export post scan action. - # @!attribute [rw] results_table - # @return [::String] - # Optional. The BigQuery table to export DataQualityScan results to. - # Format: - # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - # or - # projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - class BigQueryExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The individuals or groups who are designated to receive notifications - # upon triggers. - # @!attribute [rw] emails - # @return [::Array<::String>] - # Optional. The email recipients who will receive the DataQualityScan - # results report. - class Recipients - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This trigger is triggered when the DQ score in the job result is less - # than a specified input score. - # @!attribute [rw] score_threshold - # @return [::Float] - # Optional. The score range is in [0,100]. - class ScoreThresholdTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This trigger is triggered when the scan job itself fails, regardless of - # the result. - class JobFailureTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This trigger is triggered whenever a scan job run ends, regardless - # of the result. - class JobEndTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration of notification report post scan action. - # @!attribute [rw] recipients - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::Recipients] - # Required. The recipients who will receive the notification report. - # @!attribute [rw] score_threshold_trigger - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::ScoreThresholdTrigger] - # Optional. If set, report will be sent when score threshold is met. - # @!attribute [rw] job_failure_trigger - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobFailureTrigger] - # Optional. If set, report will be sent when a scan job fails. - # @!attribute [rw] job_end_trigger - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec::PostScanActions::JobEndTrigger] - # Optional. If set, report will be sent when a scan job ends. - class NotificationReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # The output of a DataQualityScan. - # @!attribute [r] passed - # @return [::Boolean] - # Output only. Overall data quality result -- `true` if all rules passed. - # @!attribute [r] score - # @return [::Float] - # Output only. The overall data quality score. - # - # The score ranges between [0, 100] (up to two decimal points). - # @!attribute [r] dimensions - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityDimensionResult>] - # Output only. A list of results at the dimension level. - # - # A dimension will have a corresponding `DataQualityDimensionResult` if and - # only if there is at least one rule with the 'dimension' field set to it. - # @!attribute [r] columns - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityColumnResult>] - # Output only. A list of results at the column level. - # - # A column will have a corresponding `DataQualityColumnResult` if and only if - # there is at least one rule with the 'column' field set to it. - # @!attribute [r] rules - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRuleResult>] - # Output only. A list of all the rules in a job, and their results. - # @!attribute [r] row_count - # @return [::Integer] - # Output only. The count of rows processed. - # @!attribute [r] scanned_data - # @return [::Google::Cloud::Dataplex::V1::ScannedData] - # Output only. The data scanned for this result. - # @!attribute [r] post_scan_actions_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult] - # Output only. The result of post scan actions. - # @!attribute [r] catalog_publishing_status - # @return [::Google::Cloud::Dataplex::V1::DataScanCatalogPublishingStatus] - # Output only. The status of publishing the data scan as Dataplex Universal - # Catalog metadata. - # @!attribute [r] anomaly_detection_generated_assets - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::AnomalyDetectionGeneratedAssets] - # Output only. The generated assets for anomaly detection. - class DataQualityResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of post scan actions of DataQualityScan job. - # @!attribute [r] bigquery_export_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult] - # Output only. The result of BigQuery export post scan action. - class PostScanActionsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of BigQuery export post scan action. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult::PostScanActionsResult::BigQueryExportResult::State] - # Output only. Execution state for the BigQuery exporting. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the BigQuery exporting. - class BigQueryExportResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the exporting. - module State - # The exporting state is unspecified. - STATE_UNSPECIFIED = 0 - - # The exporting completed successfully. - SUCCEEDED = 1 - - # The exporting is no longer running due to an error. - FAILED = 2 - - # The exporting is skipped due to no valid scan result to export - # (usually caused by scan failed). - SKIPPED = 3 - end - end - end - - # The assets generated by Anomaly Detection Data Scan. - # @!attribute [r] result_table - # @return [::String] - # Output only. The result table for anomaly detection. - # Format: - # PROJECT_ID.DATASET_ID.TABLE_ID - # If the result table is set at AnomalyDetectionAssets, the result table - # here would be the same as the one set in the - # AnomalyDetectionAssets.result_table. - # @!attribute [r] data_intermediate_table - # @return [::String] - # Output only. The intermediate table for data anomaly detection. - # Format: - # PROJECT_ID.DATASET_ID.TABLE_ID - # @!attribute [r] freshness_intermediate_table - # @return [::String] - # Output only. The intermediate table for freshness anomaly detection. - # Format: - # PROJECT_ID.DATASET_ID.TABLE_ID - # @!attribute [r] volume_intermediate_table - # @return [::String] - # Output only. The intermediate table for volume anomaly detection. - # Format: - # PROJECT_ID.DATASET_ID.TABLE_ID - class AnomalyDetectionGeneratedAssets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # DataQualityRuleResult provides a more detailed, per-rule view of the results. - # @!attribute [r] rule - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule] - # Output only. The rule specified in the DataQualitySpec, as is. - # @!attribute [r] passed - # @return [::Boolean] - # Output only. Whether the rule passed or failed. - # @!attribute [r] evaluated_count - # @return [::Integer] - # Output only. The number of rows a rule was evaluated against. - # - # This field is only valid for row-level type rules. - # - # Evaluated count can be configured to either - # - # * include all rows (default) - with `null` rows automatically failing rule - # evaluation, or - # * exclude `null` rows from the `evaluated_count`, by setting - # `ignore_nulls = true`. - # - # This field is not set for rule SqlAssertion. - # @!attribute [r] passed_count - # @return [::Integer] - # Output only. The number of rows which passed a rule evaluation. - # - # This field is only valid for row-level type rules. - # - # This field is not set for rule SqlAssertion. - # @!attribute [r] null_count - # @return [::Integer] - # Output only. The number of rows with null values in the specified column. - # @!attribute [r] pass_ratio - # @return [::Float] - # Output only. The ratio of **passed_count / evaluated_count**. - # - # This field is only valid for row-level type rules. - # @!attribute [r] failing_rows_query - # @return [::String] - # Output only. The query to find rows that did not pass this rule. - # - # This field is only valid for row-level type rules. - # @!attribute [r] assertion_row_count - # @return [::Integer] - # Output only. The number of rows returned by the SQL statement in a SQL - # 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 - # the results. - # @!attribute [r] dimension - # @return [::Google::Cloud::Dataplex::V1::DataQualityDimension] - # Output only. The dimension config specified in the DataQualitySpec, as is. - # @!attribute [r] passed - # @return [::Boolean] - # Output only. Whether the dimension passed or failed. - # @!attribute [r] score - # @return [::Float] - # Output only. The dimension-level data quality score for this data scan job - # if and only if the 'dimension' field is set. - # - # The score ranges between [0, 100] (up to two decimal - # points). - class DataQualityDimensionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A dimension captures data quality intent about a defined subset of the rules - # specified. - # @!attribute [r] name - # @return [::String] - # Output only. The dimension name a rule belongs to. Custom dimension name is - # supported with all uppercase letters and maximum length of 30 characters. - class DataQualityDimension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A rule captures data quality intent about a data source. - # @!attribute [rw] range_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation] - # Row-level rule which evaluates whether each column value lies between a - # specified range. - # - # Note: The following fields are mutually exclusive: `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] non_null_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation] - # Row-level rule which evaluates whether each column value is null. - # - # Note: The following fields are mutually exclusive: `non_null_expectation`, `range_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] set_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation] - # Row-level rule which evaluates whether each column value is contained by - # a specified set. - # - # Note: The following fields are mutually exclusive: `set_expectation`, `range_expectation`, `non_null_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regex_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation] - # Row-level rule which evaluates whether each column value matches a - # specified regex. - # - # Note: The following fields are mutually exclusive: `regex_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] uniqueness_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation] - # Row-level rule which evaluates whether each column value is unique. - # - # Note: The following fields are mutually exclusive: `uniqueness_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] statistic_range_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation] - # Aggregate rule which evaluates whether the column aggregate - # statistic lies between a specified range. - # - # Note: The following fields are mutually exclusive: `statistic_range_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `row_condition_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] row_condition_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation] - # Row-level rule which evaluates whether each row in a table passes the - # specified condition. - # - # Note: The following fields are mutually exclusive: `row_condition_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `table_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] table_condition_expectation - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation] - # Aggregate rule which evaluates whether the provided expression is true - # for a table. - # - # Note: The following fields are mutually exclusive: `table_condition_expectation`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `sql_assertion`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sql_assertion - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion] - # Aggregate rule which evaluates the number of rows returned for the - # provided statement. If any rows are returned, this rule fails. - # - # Note: The following fields are mutually exclusive: `sql_assertion`, `range_expectation`, `non_null_expectation`, `set_expectation`, `regex_expectation`, `uniqueness_expectation`, `statistic_range_expectation`, `row_condition_expectation`, `table_condition_expectation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] column - # @return [::String] - # Optional. The unnested column which this rule is evaluated against. - # @!attribute [rw] ignore_null - # @return [::Boolean] - # Optional. Rows with `null` values will automatically fail a rule, unless - # `ignore_null` is `true`. In that case, such `null` rows are trivially - # considered passing. - # - # This field is only valid for the following type of rules: - # - # * RangeExpectation - # * RegexExpectation - # * SetExpectation - # * UniquenessExpectation - # @!attribute [rw] dimension - # @return [::String] - # 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 - # @return [::Float] - # Optional. The minimum ratio of **passing_rows / total_rows** required to - # pass this rule, with a range of [0.0, 1.0]. - # - # 0 indicates default value (i.e. 1.0). - # - # This field is only valid for row-level type rules. - # @!attribute [rw] name - # @return [::String] - # Optional. A mutable name for the rule. - # - # * The name must contain only letters (a-z, A-Z), numbers (0-9), or - # hyphens (-). - # * The maximum length is 63 characters. - # * Must start with a letter. - # * Must end with a number or a letter. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the rule. - # - # * The maximum length is 1,024 characters. - # @!attribute [rw] suspended - # @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 - - # Evaluates whether each column value lies between a specified range. - # @!attribute [rw] min_value - # @return [::String] - # Optional. The minimum column value allowed for a row to pass this - # validation. At least one of `min_value` and `max_value` need to be - # provided. - # @!attribute [rw] max_value - # @return [::String] - # Optional. The maximum column value allowed for a row to pass this - # validation. At least one of `min_value` and `max_value` need to be - # provided. - # @!attribute [rw] strict_min_enabled - # @return [::Boolean] - # Optional. Whether each value needs to be strictly greater than ('>') the - # minimum, or if equality is allowed. - # - # Only relevant if a `min_value` has been defined. Default = false. - # @!attribute [rw] strict_max_enabled - # @return [::Boolean] - # Optional. Whether each value needs to be strictly lesser than ('<') the - # maximum, or if equality is allowed. - # - # Only relevant if a `max_value` has been defined. Default = false. - class RangeExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether each column value is null. - class NonNullExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether each column value is contained by a specified set. - # @!attribute [rw] values - # @return [::Array<::String>] - # Optional. Expected values for the column value. - class SetExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether each column value matches a specified regex. - # @!attribute [rw] regex - # @return [::String] - # Optional. A regular expression the column value is expected to match. - class RegexExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether the column has duplicates. - class UniquenessExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether the column aggregate statistic lies between a specified - # range. - # @!attribute [rw] statistic - # @return [::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation::ColumnStatistic] - # Optional. The aggregate metric to evaluate. - # @!attribute [rw] min_value - # @return [::String] - # Optional. The minimum column statistic value allowed for a row to pass - # this validation. - # - # At least one of `min_value` and `max_value` need to be provided. - # @!attribute [rw] max_value - # @return [::String] - # Optional. The maximum column statistic value allowed for a row to pass - # this validation. - # - # At least one of `min_value` and `max_value` need to be provided. - # @!attribute [rw] strict_min_enabled - # @return [::Boolean] - # Optional. Whether column statistic needs to be strictly greater than - # ('>') the minimum, or if equality is allowed. - # - # Only relevant if a `min_value` has been defined. Default = false. - # @!attribute [rw] strict_max_enabled - # @return [::Boolean] - # Optional. Whether column statistic needs to be strictly lesser than ('<') - # the maximum, or if equality is allowed. - # - # Only relevant if a `max_value` has been defined. Default = false. - class StatisticRangeExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of aggregate metrics a rule can be evaluated against. - module ColumnStatistic - # Unspecified statistic type - STATISTIC_UNDEFINED = 0 - - # Evaluate the column mean - MEAN = 1 - - # Evaluate the column min - MIN = 2 - - # Evaluate the column max - MAX = 3 - end - end - - # Evaluates whether each row passes the specified condition. - # - # The SQL expression needs to use [GoogleSQL - # syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax) - # and should produce a boolean value per row as the result. - # - # Example: col1 >= 0 AND col2 < 10 - # @!attribute [rw] sql_expression - # @return [::String] - # Optional. The SQL expression. - class RowConditionExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluates whether the provided expression is true. - # - # The SQL expression needs to use [GoogleSQL - # syntax](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax) - # and should produce a scalar boolean result. - # - # Example: MIN(col1) >= 0 - # @!attribute [rw] sql_expression - # @return [::String] - # Optional. The SQL expression. - class TableConditionExpectation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A SQL statement that is evaluated to return rows that match an invalid - # state. If any rows are are returned, this rule fails. - # - # The SQL statement must use [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). - # - # Example: `SELECT * FROM ${data()} WHERE price < 0` - # @!attribute [rw] sql_statement - # @return [::String] - # Optional. The SQL statement. - class SqlAssertion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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 - # the results. - # @!attribute [r] column - # @return [::String] - # Output only. The column specified in the DataQualityRule. - # @!attribute [r] score - # @return [::Float] - # Output only. The column-level data quality score for this data scan job if - # and only if the 'column' field is set. - # - # The score ranges between between [0, 100] (up to two decimal - # points). - # @!attribute [r] passed - # @return [::Boolean] - # Output only. Whether the column passed or failed. - # @!attribute [r] dimensions - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityDimensionResult>] - # Output only. The dimension-level results for this column. - class DataQualityColumnResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb deleted file mode 100644 index 504b5f710314..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/data_taxonomy.rb +++ /dev/null @@ -1,567 +0,0 @@ -# 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 - # DataTaxonomy represents a set of hierarchical DataAttributes resources, - # grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes - # to manage PII data. It is defined at project level. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the DataTaxonomy, of the form: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id}. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the dataTaxonomy. This - # ID will be different if the DataTaxonomy is deleted and re-created with the - # same name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataTaxonomy was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataTaxonomy was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the DataTaxonomy. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the DataTaxonomy. - # @!attribute [r] attribute_count - # @return [::Integer] - # Output only. The number of attributes in the DataTaxonomy. - # @!attribute [rw] etag - # @return [::String] - # This checksum is computed by the server based on the value of other - # fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [r] class_count - # @return [::Integer] - # Output only. The number of classes in the DataTaxonomy. - class DataTaxonomy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Denotes one dataAttribute in a dataTaxonomy, for example, PII. - # DataAttribute resources can be defined in a hierarchy. - # A single dataAttribute resource can contain specs of multiple types - # - # ``` - # PII - # - ResourceAccessSpec : - # - readers :foo@bar.com - # - DataAccessSpec : - # - readers :bar@foo.com - # ``` - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the dataAttribute, of the form: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id}. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the DataAttribute. - # This ID will be different if the DataAttribute is deleted and re-created - # with the same name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttribute was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttribute was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the DataAttribute. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the DataAttribute. - # @!attribute [rw] parent_id - # @return [::String] - # Optional. The ID of the parent DataAttribute resource, should belong to the - # same data taxonomy. Circular dependency in parent chain is not valid. - # Maximum depth of the hierarchy allowed is 4. - # [a -> b -> c -> d -> e, depth = 4] - # @!attribute [r] attribute_count - # @return [::Integer] - # Output only. The number of child attributes present for this attribute. - # @!attribute [rw] etag - # @return [::String] - # This checksum is computed by the server based on the value of other - # fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [rw] resource_access_spec - # @return [::Google::Cloud::Dataplex::V1::ResourceAccessSpec] - # Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - # BigQuery dataset, BigQuery table). - # @!attribute [rw] data_access_spec - # @return [::Google::Cloud::Dataplex::V1::DataAccessSpec] - # Optional. Specified when applied to data stored on the resource (eg: rows, - # columns in BigQuery Tables). - class DataAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # DataAttributeBinding represents binding of attributes to resources. Eg: Bind - # 'CustomerInfo' entity with 'PII' attribute. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the Data Attribute Binding, of - # the form: - # projects/\\{project_number}/locations/\\{location}/dataAttributeBindings/\\{data_attribute_binding_id} - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the - # DataAttributeBinding. This ID will be different if the DataAttributeBinding - # is deleted and re-created with the same name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttributeBinding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataAttributeBinding was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the DataAttributeBinding. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the DataAttributeBinding. - # @!attribute [rw] etag - # @return [::String] - # This checksum is computed by the server based on the value of other - # fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # Etags must be used when calling the DeleteDataAttributeBinding and the - # UpdateDataAttributeBinding method. - # @!attribute [rw] resource - # @return [::String] - # Optional. Immutable. The resource name of the resource that is associated - # to attributes. Presently, only entity resource is supported in the form: - # projects/\\{project}/locations/\\{location}/lakes/\\{lake}/zones/\\{zone}/entities/\\{entity_id} - # Must belong in the same project and region as the attribute binding, and - # there can only exist one active binding for a resource. - # @!attribute [rw] attributes - # @return [::Array<::String>] - # Optional. List of attributes to be associated with the resource, provided - # in the form: - # projects/\\{project}/locations/\\{location}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @!attribute [rw] paths - # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding::Path>] - # Optional. The list of paths for items within the associated resource (eg. - # columns and partitions within a table) along with attribute bindings. - class DataAttributeBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a subresource of the given resource, and associated bindings - # with it. Currently supported subresources are column and partition schema - # fields within a table. - # @!attribute [rw] name - # @return [::String] - # Required. The name identifier of the path. - # Nested columns should be of the form: 'address.city'. - # @!attribute [rw] attributes - # @return [::Array<::String>] - # Optional. List of attributes to be associated with the path of the - # resource, provided in the form: - # projects/\\{project}/locations/\\{location}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - class Path - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Create DataTaxonomy request. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] parent - # @return [::String] - # @!attribute [rw] data_taxonomy_id - # @return [::String] - # Required. DataTaxonomy identifier. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must be between 1-63 characters. - # * Must end with a number or a letter. - # * Must be unique within the Project. - # @!attribute [rw] data_taxonomy - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # Required. DataTaxonomy resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update DataTaxonomy request. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] data_taxonomy - # @return [::Google::Cloud::Dataplex::V1::DataTaxonomy] - # Required. Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataTaxonomy request. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] name - # @return [::String] - class GetDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataTaxonomies request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the DataTaxonomy location, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of DataTaxonomies to return. The service may - # return fewer than this value. If unspecified, at most 10 DataTaxonomies - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous ` ListDataTaxonomies` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to ` ListDataTaxonomies` must match the call that - # provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListDataTaxonomiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataTaxonomies response. - # @!attribute [rw] data_taxonomies - # @return [::Array<::Google::Cloud::Dataplex::V1::DataTaxonomy>] - # DataTaxonomies under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataTaxonomiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete DataTaxonomy request. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value,the DeleteDataTaxonomy method returns an ABORTED error. - class DeleteDataTaxonomyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create DataAttribute request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @!attribute [rw] data_attribute_id - # @return [::String] - # Required. DataAttribute identifier. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must be between 1-63 characters. - # * Must end with a number or a letter. - # * Must be unique within the DataTaxonomy. - # @!attribute [rw] data_attribute - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # Required. DataAttribute resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update DataAttribute request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] data_attribute - # @return [::Google::Cloud::Dataplex::V1::DataAttribute] - # Required. Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataAttribute request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - class GetDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributes request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the DataTaxonomy: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{data_taxonomy_id} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of DataAttributes to return. The service may - # return fewer than this value. If unspecified, at most 10 dataAttributes - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListDataAttributes` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListDataAttributes` must match the call that - # provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListDataAttributesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributes response. - # @!attribute [rw] data_attributes - # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttribute>] - # DataAttributes under the given parent DataTaxonomy. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataAttributesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete DataAttribute request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataAttribute: - # projects/\\{project_number}/locations/\\{location_id}/dataTaxonomies/\\{dataTaxonomy}/attributes/\\{data_attribute_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. If the client provided etag value does not match the current etag - # value, the DeleteDataAttribute method returns an ABORTED error response. - class DeleteDataAttributeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create DataAttributeBinding request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent data taxonomy - # projects/\\{project_number}/locations/\\{location_id} - # @!attribute [rw] data_attribute_binding_id - # @return [::String] - # Required. DataAttributeBinding identifier. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must be between 1-63 characters. - # * Must end with a number or a letter. - # * Must be unique within the Location. - # @!attribute [rw] data_attribute_binding - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # Required. DataAttributeBinding resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update DataAttributeBinding request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] data_attribute_binding - # @return [::Google::Cloud::Dataplex::V1::DataAttributeBinding] - # Required. Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataAttributeBinding request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - class GetDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributeBindings request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the Location: - # projects/\\{project_number}/locations/\\{location_id} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of DataAttributeBindings to return. The service - # may return fewer than this value. If unspecified, at most 10 - # DataAttributeBindings will be returned. The maximum value is 1000; values - # above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListDataAttributeBindings` - # call. Provide this to retrieve the subsequent page. When paginating, all - # other parameters provided to `ListDataAttributeBindings` must match the - # call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # Filter using resource: filter=resource:"resource-name" - # Filter using attribute: filter=attributes:"attribute-name" - # Filter using attribute in paths list: - # filter=paths.attributes:"attribute-name" - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListDataAttributeBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataAttributeBindings response. - # @!attribute [rw] data_attribute_bindings - # @return [::Array<::Google::Cloud::Dataplex::V1::DataAttributeBinding>] - # DataAttributeBindings under the given parent Location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataAttributeBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete DataAttributeBinding request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataAttributeBinding: - # projects/\\{project_number}/locations/\\{location_id}/dataAttributeBindings/\\{data_attribute_binding_id} - # @!attribute [rw] etag - # @return [::String] - # Required. If the client provided etag value does not match the current etag - # value, the DeleteDataAttributeBindingRequest method returns an ABORTED - # error response. Etags must be used when calling the - # DeleteDataAttributeBinding. - class DeleteDataAttributeBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb deleted file mode 100644 index 9ae7f17e597e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans.rb +++ /dev/null @@ -1,561 +0,0 @@ -# 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 - # Create dataScan request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent location: - # `projects/{project}/locations/{location_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @!attribute [rw] data_scan - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # Required. DataScan resource. - # @!attribute [rw] data_scan_id - # @return [::String] - # Required. DataScan identifier. - # - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique within the customer project / location. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is `false`. - class CreateDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update dataScan request. - # @!attribute [rw] data_scan - # @return [::Google::Cloud::Dataplex::V1::DataScan] - # Required. DataScan resource to be updated. - # - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # 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 UpdateDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete dataScan request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataScan: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any child resources of this data scan will also - # be deleted. (Otherwise, the request will only work if the data scan has no - # child resources.) - class DeleteDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get dataScan request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataScan: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView] - # Optional. Select the DataScan view to return. Defaults to `BASIC`. - class GetDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataScan view options. - module DataScanView - # The API will default to the `BASIC` view. - DATA_SCAN_VIEW_UNSPECIFIED = 0 - - # Basic view that does not include *spec* and *result*. - BASIC = 1 - - # Include everything. - FULL = 10 - end - end - - # List dataScans request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent location: - # `projects/{project}/locations/{location_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of dataScans to return. The service may return - # fewer than this value. If unspecified, at most 500 scans will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListDataScans` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListDataScans` must match the call that provided the - # page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields (`name` or `create_time`) for the result. - # If not specified, the ordering is undefined. - class ListDataScansRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List dataScans response. - # @!attribute [rw] data_scans - # @return [::Array<::Google::Cloud::Dataplex::V1::DataScan>] - # DataScans (`BASIC` view only) under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDataScansResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Run DataScan Request - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataScan: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # - # Only **OnDemand** data scans are allowed. - class RunDataScanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Run DataScan Response. - # @!attribute [rw] job - # @return [::Google::Cloud::Dataplex::V1::DataScanJob] - # DataScanJob created by RunDataScan request. - class RunDataScanResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get DataScanJob request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the DataScanJob: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView] - # Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - class GetDataScanJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataScanJob view options. - module DataScanJobView - # The API will default to the `BASIC` view. - DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0 - - # Basic view that does not include *spec* and *result*. - BASIC = 1 - - # Include everything. - FULL = 10 - end - end - - # List DataScanJobs request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent environment: - # `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of DataScanJobs to return. The service may return - # fewer than this value. If unspecified, at most 10 DataScanJobs will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListDataScanJobs` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListDataScanJobs` must match the call that provided - # the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression for filtering the results of the ListDataScanJobs - # request. - # - # If unspecified, all datascan jobs will be returned. Multiple filters can be - # applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - # - # Allowed fields are: - # - # - `start_time` - # - `end_time` - # - # `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - # 2018-10-08T18:30:00-07:00). - # - # For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - # 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - # specified start and end times. - class ListDataScanJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List DataScanJobs response. - # @!attribute [rw] data_scan_jobs - # @return [::Array<::Google::Cloud::Dataplex::V1::DataScanJob>] - # DataScanJobs (`BASIC` view only) under a given dataScan. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListDataScanJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request details for generating data quality rule recommendations. - # @!attribute [rw] name - # @return [::String] - # Required. The name must be one of the following: - # - # * The name of a data scan with at least one successful, completed data - # profiling job - # * The name of a successful, completed data profiling job (a data scan job - # where the job type is data profiling) - class GenerateDataQualityRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response details for data quality rule recommendations. - # @!attribute [rw] rule - # @return [::Array<::Google::Cloud::Dataplex::V1::DataQualityRule>] - # The data quality rules that Dataplex Universal Catalog generates based on - # the results of a data profiling scan. - class GenerateDataQualityRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a user-visible job which provides the insights for the related - # data source. - # - # For example: - # - # * Data quality: generates queries based on the rules and runs against the - # data to get data quality check results. For more information, see [Auto - # data quality - # overview](https://cloud.google.com/dataplex/docs/auto-data-quality-overview). - # * Data profile: analyzes the data in tables and generates insights about - # the structure, content and relationships (such as null percent, - # cardinality, min/max/mean, etc). For more information, see [About data - # profiling](https://cloud.google.com/dataplex/docs/data-profiling-overview). - # * Data discovery: scans data in Cloud Storage buckets to extract and then - # catalog metadata. For more information, see [Discover and catalog Cloud - # Storage data](https://cloud.google.com/bigquery/docs/automatic-discovery). - # * Data documentation: analyzes the table details and generates insights - # including descriptions and sample SQL queries for the table. For more - # information, see [Generate data insights in - # BigQuery](https://cloud.google.com/bigquery/docs/data-insights). - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The relative resource name of the scan, of the - # form: `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the scan. This ID will - # be different if the scan is deleted and re-created with the same name. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the scan. - # - # * Must be between 1-1024 characters. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # - # * Must be between 1-256 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the scan. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the DataScan. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the scan was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the scan was last updated. - # @!attribute [rw] data - # @return [::Google::Cloud::Dataplex::V1::DataSource] - # Required. The data source for DataScan. - # @!attribute [rw] execution_spec - # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionSpec] - # Optional. DataScan execution settings. - # - # If not specified, the fields in it will use their default values. - # @!attribute [r] execution_status - # @return [::Google::Cloud::Dataplex::V1::DataScan::ExecutionStatus] - # Output only. Status of the data scan execution. - # @!attribute [r] type - # @return [::Google::Cloud::Dataplex::V1::DataScanType] - # Output only. The type of DataScan. - # @!attribute [rw] data_quality_spec - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] - # Settings for a data quality scan. - # - # Note: The following fields are mutually exclusive: `data_quality_spec`, `data_profile_spec`, `data_discovery_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_profile_spec - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] - # Settings for a data profile scan. - # - # Note: The following fields are mutually exclusive: `data_profile_spec`, `data_quality_spec`, `data_discovery_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_discovery_spec - # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec] - # Settings for a data discovery scan. - # - # Note: The following fields are mutually exclusive: `data_discovery_spec`, `data_quality_spec`, `data_profile_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_documentation_spec - # @return [::Google::Cloud::Dataplex::V1::DataDocumentationSpec] - # Settings for a data documentation scan. - # - # Note: The following fields are mutually exclusive: `data_documentation_spec`, `data_quality_spec`, `data_profile_spec`, `data_discovery_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_quality_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] - # Output only. The result of a data quality scan. - # - # Note: The following fields are mutually exclusive: `data_quality_result`, `data_profile_result`, `data_discovery_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_profile_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] - # Output only. The result of a data profile scan. - # - # Note: The following fields are mutually exclusive: `data_profile_result`, `data_quality_result`, `data_discovery_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_discovery_result - # @return [::Google::Cloud::Dataplex::V1::DataDiscoveryResult] - # Output only. The result of a data discovery scan. - # - # Note: The following fields are mutually exclusive: `data_discovery_result`, `data_quality_result`, `data_profile_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_documentation_result - # @return [::Google::Cloud::Dataplex::V1::DataDocumentationResult] - # Output only. The result of a data documentation scan. - # - # Note: The following fields are mutually exclusive: `data_documentation_result`, `data_quality_result`, `data_profile_result`, `data_discovery_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataScan - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataScan execution settings. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Dataplex::V1::Trigger] - # Optional. Spec related to how often and when a scan should be triggered. - # - # If not specified, the default is `OnDemand`, which means the scan will - # not run until the user calls `RunDataScan` API. - # @!attribute [rw] field - # @return [::String] - # Immutable. The unnested field (of type *Date* or *Timestamp*) that - # contains values which monotonically increase over time. - # - # If not specified, a data scan will run for all data in the table. - class ExecutionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of the data scan execution. - # @!attribute [rw] latest_job_start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time when the latest DataScanJob started. - # @!attribute [rw] latest_job_end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time when the latest DataScanJob ended. - # @!attribute [rw] latest_job_create_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The time when the DataScanJob execution was created. - class ExecutionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A DataScanJob represents an instance of DataScan execution. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The relative resource name of the DataScanJob, of - # the form: - # `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - # where `project` refers to a *project_id* or *project_number* and - # `location_id` refers to a Google Cloud region. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the DataScanJob. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataScanJob was created. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataScanJob was started. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the DataScanJob ended. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::DataScanJob::State] - # Output only. Execution state for the DataScanJob. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the current state. - # @!attribute [r] type - # @return [::Google::Cloud::Dataplex::V1::DataScanType] - # Output only. The type of the parent DataScan. - # @!attribute [r] data_quality_spec - # @return [::Google::Cloud::Dataplex::V1::DataQualitySpec] - # Output only. Settings for a data quality scan. - # - # Note: The following fields are mutually exclusive: `data_quality_spec`, `data_profile_spec`, `data_discovery_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_profile_spec - # @return [::Google::Cloud::Dataplex::V1::DataProfileSpec] - # Output only. Settings for a data profile scan. - # - # Note: The following fields are mutually exclusive: `data_profile_spec`, `data_quality_spec`, `data_discovery_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_discovery_spec - # @return [::Google::Cloud::Dataplex::V1::DataDiscoverySpec] - # Output only. Settings for a data discovery scan. - # - # Note: The following fields are mutually exclusive: `data_discovery_spec`, `data_quality_spec`, `data_profile_spec`, `data_documentation_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_documentation_spec - # @return [::Google::Cloud::Dataplex::V1::DataDocumentationSpec] - # Output only. Settings for a data documentation scan. - # - # Note: The following fields are mutually exclusive: `data_documentation_spec`, `data_quality_spec`, `data_profile_spec`, `data_discovery_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_quality_result - # @return [::Google::Cloud::Dataplex::V1::DataQualityResult] - # Output only. The result of a data quality scan. - # - # Note: The following fields are mutually exclusive: `data_quality_result`, `data_profile_result`, `data_discovery_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_profile_result - # @return [::Google::Cloud::Dataplex::V1::DataProfileResult] - # Output only. The result of a data profile scan. - # - # Note: The following fields are mutually exclusive: `data_profile_result`, `data_quality_result`, `data_discovery_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_discovery_result - # @return [::Google::Cloud::Dataplex::V1::DataDiscoveryResult] - # Output only. The result of a data discovery scan. - # - # Note: The following fields are mutually exclusive: `data_discovery_result`, `data_quality_result`, `data_profile_result`, `data_documentation_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] data_documentation_result - # @return [::Google::Cloud::Dataplex::V1::DataDocumentationResult] - # Output only. The result of a data documentation scan. - # - # Note: The following fields are mutually exclusive: `data_documentation_result`, `data_quality_result`, `data_profile_result`, `data_discovery_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataScanJob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the DataScanJob. - module State - # The DataScanJob state is unspecified. - STATE_UNSPECIFIED = 0 - - # The DataScanJob is running. - RUNNING = 1 - - # The DataScanJob is canceling. - CANCELING = 2 - - # The DataScanJob cancellation was successful. - CANCELLED = 3 - - # The DataScanJob completed successfully. - SUCCEEDED = 4 - - # The DataScanJob is no longer running due to an error. - FAILED = 5 - - # The DataScanJob has been created but not started to run yet. - PENDING = 7 - end - end - - # The type of data scan. - module DataScanType - # The data scan type is unspecified. - DATA_SCAN_TYPE_UNSPECIFIED = 0 - - # Data quality scan. - DATA_QUALITY = 1 - - # Data profile scan. - DATA_PROFILE = 2 - - # Data discovery scan. - DATA_DISCOVERY = 3 - - # Data documentation scan. - DATA_DOCUMENTATION = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb deleted file mode 100644 index daeeb360bac0..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/datascans_common.rb +++ /dev/null @@ -1,52 +0,0 @@ -# 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 - # The status of publishing the data scan result as Dataplex Universal Catalog - # 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 publishing. - class DataScanCatalogPublishingStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the publishing. - module State - # The publishing state is unspecified. - STATE_UNSPECIFIED = 0 - - # Publishing to catalog completed successfully. - SUCCEEDED = 1 - - # Publish to catalog failed. - FAILED = 2 - - # Publishing to catalog was skipped. - SKIPPED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb deleted file mode 100644 index e1b7ee3dcec4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/logs.rb +++ /dev/null @@ -1,964 +0,0 @@ -# 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 - # The payload associated with Discovery data processing. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] lake_id - # @return [::String] - # The id of the associated lake. - # @!attribute [rw] zone_id - # @return [::String] - # The id of the associated zone. - # @!attribute [rw] asset_id - # @return [::String] - # The id of the associated asset. - # @!attribute [rw] data_location - # @return [::String] - # The data location associated with the event. - # @!attribute [rw] datascan_id - # @return [::String] - # The id of the associated datascan for standalone discovery. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EventType] - # The type of the event being logged. - # @!attribute [rw] config - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ConfigDetails] - # Details about discovery configuration in effect. - # - # Note: The following fields are mutually exclusive: `config`, `entity`, `partition`, `action`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityDetails] - # Details about the entity associated with the event. - # - # Note: The following fields are mutually exclusive: `entity`, `config`, `partition`, `action`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] partition - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::PartitionDetails] - # Details about the partition associated with the event. - # - # Note: The following fields are mutually exclusive: `partition`, `config`, `entity`, `action`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] action - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::ActionDetails] - # Details about the action associated with the event. - # - # Note: The following fields are mutually exclusive: `action`, `config`, `entity`, `partition`, `table`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] table - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::TableDetails] - # Details about the BigQuery table publishing associated with the event. - # - # Note: The following fields are mutually exclusive: `table`, `config`, `entity`, `partition`, `action`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DiscoveryEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details about configuration events. - # @!attribute [rw] parameters - # @return [::Google::Protobuf::Map{::String => ::String}] - # A list of discovery configuration parameters in effect. - # The keys are the field paths within DiscoverySpec. - # Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - # etc. - class ConfigDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParametersEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details about the entity. - # @!attribute [rw] entity - # @return [::String] - # The name of the entity resource. - # The name is the fully-qualified resource name. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] - # The type of the entity resource. - class EntityDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the published table. - # @!attribute [rw] table - # @return [::String] - # The fully-qualified resource name of the table resource. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::TableType] - # The type of the table resource. - class TableDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the partition. - # @!attribute [rw] partition - # @return [::String] - # The name to the partition resource. - # The name is the fully-qualified resource name. - # @!attribute [rw] entity - # @return [::String] - # The name to the containing entity resource. - # The name is the fully-qualified resource name. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DiscoveryEvent::EntityType] - # The type of the containing entity resource. - # @!attribute [rw] sampled_data_locations - # @return [::Array<::String>] - # The locations of the data items (e.g., a Cloud Storage objects) sampled - # for metadata inference. - class PartitionDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the action. - # @!attribute [rw] type - # @return [::String] - # The type of action. - # Eg. IncompatibleDataSchema, InvalidDataFormat - # @!attribute [rw] issue - # @return [::String] - # The human readable issue associated with the action. - class ActionDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of the event. - module EventType - # An unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0 - - # An event representing discovery configuration in effect. - CONFIG = 1 - - # An event representing a metadata entity being created. - ENTITY_CREATED = 2 - - # An event representing a metadata entity being updated. - ENTITY_UPDATED = 3 - - # An event representing a metadata entity being deleted. - ENTITY_DELETED = 4 - - # An event representing a partition being created. - PARTITION_CREATED = 5 - - # An event representing a partition being updated. - PARTITION_UPDATED = 6 - - # An event representing a partition being deleted. - PARTITION_DELETED = 7 - - # An event representing a table being published. - TABLE_PUBLISHED = 10 - - # An event representing a table being updated. - TABLE_UPDATED = 11 - - # An event representing a table being skipped in publishing. - TABLE_IGNORED = 12 - - # An event representing a table being deleted. - TABLE_DELETED = 13 - end - - # The type of the entity. - module EntityType - # An unspecified event type. - ENTITY_TYPE_UNSPECIFIED = 0 - - # Entities representing structured data. - TABLE = 1 - - # Entities representing unstructured data. - FILESET = 2 - end - - # The type of the published table. - module TableType - # An unspecified table type. - TABLE_TYPE_UNSPECIFIED = 0 - - # External table type. - EXTERNAL_TABLE = 1 - - # BigLake table type. - BIGLAKE_TABLE = 2 - - # Object table type for unstructured data. - OBJECT_TABLE = 3 - end - end - - # The payload associated with Job logs that contains events describing jobs - # that have run within a Lake. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] job_id - # @return [::String] - # The unique id identifying the job. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time when the job started running. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the job ended running. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::JobEvent::State] - # The job state on completion. - # @!attribute [rw] retries - # @return [::Integer] - # The number of retries. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::JobEvent::Type] - # The type of the job. - # @!attribute [rw] service - # @return [::Google::Cloud::Dataplex::V1::JobEvent::Service] - # The service used to execute the job. - # @!attribute [rw] service_job - # @return [::String] - # The reference to the job within the service. - # @!attribute [rw] execution_trigger - # @return [::Google::Cloud::Dataplex::V1::JobEvent::ExecutionTrigger] - # Job execution trigger. - class JobEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the job. - module Type - # Unspecified job type. - TYPE_UNSPECIFIED = 0 - - # Spark jobs. - SPARK = 1 - - # Notebook jobs. - NOTEBOOK = 2 - end - - # The completion status of the job. - module State - # Unspecified job state. - STATE_UNSPECIFIED = 0 - - # Job successfully completed. - SUCCEEDED = 1 - - # Job was unsuccessful. - FAILED = 2 - - # Job was cancelled by the user. - CANCELLED = 3 - - # Job was cancelled or aborted via the service executing the job. - ABORTED = 4 - end - - # The service used to execute the job. - module Service - # Unspecified service. - SERVICE_UNSPECIFIED = 0 - - # Cloud Dataproc. - DATAPROC = 1 - end - - # Job Execution trigger. - module ExecutionTrigger - # The job execution trigger is unspecified. - EXECUTION_TRIGGER_UNSPECIFIED = 0 - - # The job was triggered by Dataplex Universal Catalog based on trigger spec - # from task definition. - TASK_CONFIG = 1 - - # The job was triggered by the explicit call of Task API. - RUN_REQUEST = 2 - end - end - - # These messages contain information about sessions within an environment. - # The monitored resource is 'Environment'. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] user_id - # @return [::String] - # The information about the user that created the session. It will be the - # email address of the user. - # @!attribute [rw] session_id - # @return [::String] - # Unique identifier for the session. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::SessionEvent::EventType] - # The type of the event. - # @!attribute [rw] query - # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail] - # The execution details of the query. - # @!attribute [rw] event_succeeded - # @return [::Boolean] - # The status of the event. - # @!attribute [rw] fast_startup_enabled - # @return [::Boolean] - # If the session is associated with an environment with fast startup enabled, - # and was created before being assigned to a user. - # @!attribute [rw] unassigned_duration - # @return [::Google::Protobuf::Duration] - # The idle duration of a warm pooled session before it is assigned to user. - class SessionEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution details of the query. - # @!attribute [rw] query_id - # @return [::String] - # The unique Query id identifying the query. - # @!attribute [rw] query_text - # @return [::String] - # The query text executed. - # @!attribute [rw] engine - # @return [::Google::Cloud::Dataplex::V1::SessionEvent::QueryDetail::Engine] - # Query Execution engine. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Time taken for execution of the query. - # @!attribute [rw] result_size_bytes - # @return [::Integer] - # The size of results the query produced. - # @!attribute [rw] data_processed_bytes - # @return [::Integer] - # The data processed by the query. - class QueryDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Query Execution engine. - module Engine - # An unspecified Engine type. - ENGINE_UNSPECIFIED = 0 - - # Spark-sql engine is specified in Query. - SPARK_SQL = 1 - - # BigQuery engine is specified in Query. - BIGQUERY = 2 - end - end - - # The type of the event. - module EventType - # An unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0 - - # Event when the session is assigned to a user. - START = 1 - - # Event for stop of a session. - STOP = 2 - - # Query events in the session. - QUERY = 3 - - # Event for creation of a cluster. It is not yet assigned to a user. - # This comes before START in the sequence - CREATE = 4 - end - end - - # Payload associated with Governance related log events. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] event_type - # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::EventType] - # The type of the event. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity] - # Entity resource information if the log event is associated with a - # specific entity. - class GovernanceEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about Entity resource that the log event is associated with. - # @!attribute [rw] entity - # @return [::String] - # The Entity resource the log event is associated with. - # Format: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - # @!attribute [rw] entity_type - # @return [::Google::Cloud::Dataplex::V1::GovernanceEvent::Entity::EntityType] - # Type of entity. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of entity. - module EntityType - # An unspecified Entity type. - ENTITY_TYPE_UNSPECIFIED = 0 - - # Table entity type. - TABLE = 1 - - # Fileset entity type. - FILESET = 2 - end - end - - # Type of governance log event. - module EventType - # An unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0 - - # Resource IAM policy update event. - RESOURCE_IAM_POLICY_UPDATE = 1 - - # BigQuery table create event. - BIGQUERY_TABLE_CREATE = 2 - - # BigQuery table update event. - BIGQUERY_TABLE_UPDATE = 3 - - # BigQuery table delete event. - BIGQUERY_TABLE_DELETE = 4 - - # BigQuery connection create event. - BIGQUERY_CONNECTION_CREATE = 5 - - # BigQuery connection update event. - BIGQUERY_CONNECTION_UPDATE = 6 - - # BigQuery connection delete event. - BIGQUERY_CONNECTION_DELETE = 7 - - # BigQuery taxonomy created. - BIGQUERY_TAXONOMY_CREATE = 10 - - # BigQuery policy tag created. - BIGQUERY_POLICY_TAG_CREATE = 11 - - # BigQuery policy tag deleted. - BIGQUERY_POLICY_TAG_DELETE = 12 - - # BigQuery set iam policy for policy tag. - BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13 - - # Access policy update event. - ACCESS_POLICY_UPDATE = 14 - - # Number of resources matched with particular Query. - GOVERNANCE_RULE_MATCHED_RESOURCES = 15 - - # Rule processing exceeds the allowed limit. - GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16 - - # Rule processing errors. - GOVERNANCE_RULE_ERRORS = 17 - - # Governance rule processing Event. - GOVERNANCE_RULE_PROCESSING = 18 - end - end - - # These messages contain information about the execution of a datascan. - # The monitored resource is 'DataScan' - # @!attribute [rw] data_source - # @return [::String] - # The data source of the data scan - # @!attribute [rw] job_id - # @return [::String] - # The identifier of the specific data scan job this log entry is for. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the data scan job was created. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time when the data scan job started to run. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time when the data scan job finished. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::ScanType] - # The type of the data scan. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::State] - # The status of the data scan job. - # @!attribute [rw] message - # @return [::String] - # The message describing the data scan job event. - # @!attribute [rw] spec_version - # @return [::String] - # A version identifier of the spec which was used to execute this job. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Trigger] - # The trigger type of the data scan job. - # @!attribute [rw] scope - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::Scope] - # The scope of the data scan (e.g. full, incremental). - # @!attribute [rw] data_profile - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileResult] - # Data profile result for data profile type data scan. - # - # Note: The following fields are mutually exclusive: `data_profile`, `data_quality`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_quality - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityResult] - # Data quality result for data quality type data scan. - # - # Note: The following fields are mutually exclusive: `data_quality`, `data_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_profile_configs - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataProfileAppliedConfigs] - # Applied configs for data profile type data scan. - # - # Note: The following fields are mutually exclusive: `data_profile_configs`, `data_quality_configs`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_quality_configs - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::DataQualityAppliedConfigs] - # Applied configs for data quality type data scan. - # - # Note: The following fields are mutually exclusive: `data_quality_configs`, `data_profile_configs`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] post_scan_actions_result - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult] - # The result of post scan actions. - # @!attribute [rw] catalog_publishing_status - # @return [::Google::Cloud::Dataplex::V1::DataScanCatalogPublishingStatus] - # The status of publishing the data scan as Dataplex Universal Catalog - # metadata. - class DataScanEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Data profile result for data scan job. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows processed in the data scan job. - class DataProfileResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Data quality result for data scan job. - # @!attribute [rw] row_count - # @return [::Integer] - # The count of rows processed in the data scan job. - # @!attribute [rw] passed - # @return [::Boolean] - # Whether the data quality result was `pass` or not. - # @!attribute [rw] dimension_passed - # @return [::Google::Protobuf::Map{::String => ::Boolean}] - # The result of each dimension for data quality result. - # The key of the map is the name of the dimension. - # The value is the bool value depicting whether the dimension result was - # `pass` or not. - # @!attribute [rw] score - # @return [::Float] - # The table-level data quality score for the data scan job. - # - # The data quality score ranges between [0, 100] (up to two decimal - # points). - # @!attribute [rw] dimension_score - # @return [::Google::Protobuf::Map{::String => ::Float}] - # The score of each dimension for data quality result. - # The key of the map is the name of the dimension. - # The value is the data quality score for the dimension. - # - # The score ranges between [0, 100] (up to two decimal - # points). - # @!attribute [rw] column_score - # @return [::Google::Protobuf::Map{::String => ::Float}] - # The score of each column scanned in the data scan job. - # The key of the map is the name of the column. - # The value is the data quality score for the column. - # - # The score ranges between [0, 100] (up to two decimal - # points). - class DataQualityResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Boolean] - class DimensionPassedEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Float] - class DimensionScoreEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Float] - class ColumnScoreEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Applied configs for data profile type data scan job. - # @!attribute [rw] sampling_percent - # @return [::Float] - # The percentage of the records selected from the dataset for DataScan. - # - # * Value ranges between 0.0 and 100.0. - # * Value 0.0 or 100.0 imply that sampling was not applied. - # @!attribute [rw] row_filter_applied - # @return [::Boolean] - # Boolean indicating whether a row filter was applied in the DataScan job. - # @!attribute [rw] column_filter_applied - # @return [::Boolean] - # Boolean indicating whether a column filter was applied in the DataScan - # job. - class DataProfileAppliedConfigs - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Applied configs for data quality type data scan job. - # @!attribute [rw] sampling_percent - # @return [::Float] - # The percentage of the records selected from the dataset for DataScan. - # - # * Value ranges between 0.0 and 100.0. - # * Value 0.0 or 100.0 imply that sampling was not applied. - # @!attribute [rw] row_filter_applied - # @return [::Boolean] - # Boolean indicating whether a row filter was applied in the DataScan job. - class DataQualityAppliedConfigs - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Post scan actions result for data scan job. - # @!attribute [rw] bigquery_export_result - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult] - # The result of BigQuery export post scan action. - class PostScanActionsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of BigQuery export post scan action. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::DataScanEvent::PostScanActionsResult::BigQueryExportResult::State] - # Execution state for the BigQuery exporting. - # @!attribute [rw] message - # @return [::String] - # Additional information about the BigQuery exporting. - class BigQueryExportResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Execution state for the exporting. - module State - # The exporting state is unspecified. - STATE_UNSPECIFIED = 0 - - # The exporting completed successfully. - SUCCEEDED = 1 - - # The exporting is no longer running due to an error. - FAILED = 2 - - # The exporting is skipped due to no valid scan result to export - # (usually caused by scan failed). - SKIPPED = 3 - end - end - end - - # The type of the data scan. - module ScanType - # An unspecified data scan type. - SCAN_TYPE_UNSPECIFIED = 0 - - # Data scan for data profile. - DATA_PROFILE = 1 - - # Data scan for data quality. - DATA_QUALITY = 2 - - # Data scan for data discovery. - DATA_DISCOVERY = 4 - end - - # The job state of the data scan. - module State - # Unspecified job state. - STATE_UNSPECIFIED = 0 - - # Data scan job started. - STARTED = 1 - - # Data scan job successfully completed. - SUCCEEDED = 2 - - # Data scan job was unsuccessful. - FAILED = 3 - - # Data scan job was cancelled. - CANCELLED = 4 - - # Data scan job was created. - CREATED = 5 - end - - # The trigger type for the data scan. - module Trigger - # An unspecified trigger type. - TRIGGER_UNSPECIFIED = 0 - - # Data scan triggers on demand. - ON_DEMAND = 1 - - # Data scan triggers as per schedule. - SCHEDULE = 2 - - # Data scan is run one time on creation. - ONE_TIME = 3 - end - - # The scope of job for the data scan. - module Scope - # An unspecified scope type. - SCOPE_UNSPECIFIED = 0 - - # Data scan runs on all of the data. - FULL = 1 - - # Data scan runs on incremental data. - INCREMENTAL = 2 - end - end - - # Information about the result of a data quality rule for data quality scan. - # The monitored resource is 'DataScan'. - # @!attribute [rw] job_id - # @return [::String] - # Identifier of the specific data scan job this log entry is for. - # @!attribute [rw] data_source - # @return [::String] - # The data source of the data scan (e.g. BigQuery table name). - # @!attribute [rw] column - # @return [::String] - # The column which this rule is evaluated against. - # @!attribute [rw] rule_name - # @return [::String] - # The name of the data quality rule. - # @!attribute [rw] rule_type - # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::RuleType] - # The type of the data quality rule. - # @!attribute [rw] evalution_type - # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::EvaluationType] - # The evaluation type of the data quality rule. - # @!attribute [rw] rule_dimension - # @return [::String] - # The dimension of the data quality rule. - # @!attribute [rw] threshold_percent - # @return [::Float] - # The passing threshold ([0.0, 100.0]) of the data quality rule. - # @!attribute [rw] result - # @return [::Google::Cloud::Dataplex::V1::DataQualityScanRuleResult::Result] - # The result of the data quality rule. - # @!attribute [rw] evaluated_row_count - # @return [::Integer] - # The number of rows evaluated against the data quality rule. - # This field is only valid for rules of PER_ROW evaluation type. - # @!attribute [rw] passed_row_count - # @return [::Integer] - # The number of rows which passed a rule evaluation. - # This field is only valid for rules of PER_ROW evaluation type. - # @!attribute [rw] null_row_count - # @return [::Integer] - # The number of rows with null values in the specified column. - # @!attribute [rw] assertion_row_count - # @return [::Integer] - # The number of rows returned by the SQL statement in a SQL assertion rule. - # This field is only valid for SQL assertion rules. - class DataQualityScanRuleResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the data quality rule. - module RuleType - # An unspecified rule type. - RULE_TYPE_UNSPECIFIED = 0 - - # See - # {::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation DataQualityRule.NonNullExpectation}. - NON_NULL_EXPECTATION = 1 - - # See - # {::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation DataQualityRule.RangeExpectation}. - RANGE_EXPECTATION = 2 - - # See - # {::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation DataQualityRule.RegexExpectation}. - REGEX_EXPECTATION = 3 - - # See - # {::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation DataQualityRule.RowConditionExpectation}. - ROW_CONDITION_EXPECTATION = 4 - - # See - # {::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation DataQualityRule.SetExpectation}. - SET_EXPECTATION = 5 - - # See - # {::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation DataQualityRule.StatisticRangeExpectation}. - STATISTIC_RANGE_EXPECTATION = 6 - - # See - # {::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation DataQualityRule.TableConditionExpectation}. - TABLE_CONDITION_EXPECTATION = 7 - - # See - # {::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation DataQualityRule.UniquenessExpectation}. - UNIQUENESS_EXPECTATION = 8 - - # See - # {::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion DataQualityRule.SqlAssertion}. - SQL_ASSERTION = 9 - end - - # The evaluation type of the data quality rule. - module EvaluationType - # An unspecified evaluation type. - EVALUATION_TYPE_UNSPECIFIED = 0 - - # The rule evaluation is done at per row level. - PER_ROW = 1 - - # The rule evaluation is done for an aggregate of rows. - AGGREGATE = 2 - end - - # Whether the data quality rule passed or failed. - module Result - # An unspecified result. - RESULT_UNSPECIFIED = 0 - - # The data quality rule passed. - PASSED = 1 - - # The data quality rule failed. - FAILED = 2 - end - end - - # Payload associated with Business Glossary related log events. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] event_type - # @return [::Google::Cloud::Dataplex::V1::BusinessGlossaryEvent::EventType] - # The type of the event. - # @!attribute [rw] resource - # @return [::String] - # Name of the resource. - class BusinessGlossaryEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of glossary log event. - module EventType - # An unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0 - - # Glossary create event. - GLOSSARY_CREATE = 1 - - # Glossary update event. - GLOSSARY_UPDATE = 2 - - # Glossary delete event. - GLOSSARY_DELETE = 3 - - # Glossary category create event. - GLOSSARY_CATEGORY_CREATE = 4 - - # Glossary category update event. - GLOSSARY_CATEGORY_UPDATE = 5 - - # Glossary category delete event. - GLOSSARY_CATEGORY_DELETE = 6 - - # Glossary term create event. - GLOSSARY_TERM_CREATE = 7 - - # Glossary term update event. - GLOSSARY_TERM_UPDATE = 8 - - # Glossary term delete event. - GLOSSARY_TERM_DELETE = 9 - end - end - - # Payload associated with Entry related log events. - # @!attribute [rw] message - # @return [::String] - # The log message. - # @!attribute [rw] event_type - # @return [::Google::Cloud::Dataplex::V1::EntryLinkEvent::EventType] - # The type of the event. - # @!attribute [rw] resource - # @return [::String] - # Name of the resource. - class EntryLinkEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of entry link log event. - module EventType - # An unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0 - - # EntryLink create event. - ENTRY_LINK_CREATE = 1 - - # EntryLink delete event. - ENTRY_LINK_DELETE = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb deleted file mode 100644 index 9c2e28a54d24..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/metadata.rb +++ /dev/null @@ -1,741 +0,0 @@ -# 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 - # Create a metadata entity request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::Entity] - # Required. Entity resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update a metadata entity request. - # The exiting entity will be fully replaced by the entity in the request. - # The entity ID is mutable. To modify the ID, use the current entity ID in the - # request URL and specify the new ID in the request body. - # @!attribute [rw] entity - # @return [::Google::Cloud::Dataplex::V1::Entity] - # Required. Update description. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete a metadata entity request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @!attribute [rw] etag - # @return [::String] - # Required. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. - class DeleteEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List metadata entities request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView] - # Required. Specify the entity view to make a partial list request. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of entities to return. The service may return - # fewer than this value. If unspecified, 100 entities will be returned by - # default. The maximum value is 500; larger values will will be truncated to - # 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListEntities` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListEntities` must match the call that provided the - # page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. The following filter parameters can be added to the URL to limit - # the entities returned by the API: - # - # - Entity ID: ?filter="id=entityID" - # - Asset ID: ?filter="asset=assetID" - # - Data path ?filter="data_path=gs://my-bucket" - # - Is HIVE compatible: ?filter="hive_compatible=true" - # - Is BigQuery compatible: ?filter="bigquery_compatible=true" - class ListEntitiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entity views. - module EntityView - # The default unset value. Return both table and fileset entities - # if unspecified. - ENTITY_VIEW_UNSPECIFIED = 0 - - # Only list table entities. - TABLES = 1 - - # Only list fileset entities. - FILESETS = 2 - end - end - - # List metadata entities response. - # @!attribute [rw] entities - # @return [::Array<::Google::Cloud::Dataplex::V1::Entity>] - # Entities in the specified parent zone. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # remaining results in the list. - class ListEntitiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get metadata entity request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - # @!attribute [rw] view - # @return [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView] - # Optional. Used to select the subset of entity information to return. - # Defaults to `BASIC`. - class GetEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entity views for get entity partial result. - module EntityView - # The API will default to the `BASIC` view. - ENTITY_VIEW_UNSPECIFIED = 0 - - # Minimal view that does not include the schema. - BASIC = 1 - - # Include basic information and schema. - SCHEMA = 2 - - # Include everything. Currently, this is the same as the SCHEMA view. - FULL = 4 - end - end - - # List metadata partitions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent entity: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of partitions to return. The service may return - # fewer than this value. If unspecified, 100 partitions will be returned by - # default. The maximum page size is 500; larger values will will be truncated - # to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListPartitions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListPartitions` must match the call that provided - # the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter the partitions returned to the caller using a key value - # pair expression. Supported operators and syntax: - # - # - logic operators: AND, OR - # - comparison operators: <, >, >=, <= ,=, != - # - LIKE operators: - # - The right hand of a LIKE operator supports "." and - # "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - # - parenthetical grouping: ( ) - # - # Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - # - # **Notes:** - # - # - Keys to the left of operators are case insensitive. - # - Partition results are sorted first by creation time, then by - # lexicographic order. - # - Up to 20 key value filter pairs are allowed, but due to performance - # considerations, only the first 10 will be used as a filter. - class ListPartitionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create metadata partition request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # @!attribute [rw] partition - # @return [::Google::Cloud::Dataplex::V1::Partition] - # Required. Partition resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreatePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete metadata partition request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the partition. - # format: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - # The \\{partition_value_path} segment consists of an ordered sequence of - # partition values separated by "/". All values must be provided. - # @!attribute [rw] etag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. The etag associated with the partition. - class DeletePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List metadata partitions response. - # @!attribute [rw] partitions - # @return [::Array<::Google::Cloud::Dataplex::V1::Partition>] - # Partitions under the specified parent entity. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # remaining results in the list. - class ListPartitionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get metadata partition request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the partition: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - # The \\{partition_value_path} segment consists of an ordered sequence of - # partition values separated by "/". All values must be provided. - class GetPartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents tables and fileset metadata contained within a zone. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the entity, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Display name must be shorter than or equal to 256 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User friendly longer description text. Must be shorter than or - # equal to 1024 characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the entity was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the entity was last updated. - # @!attribute [rw] id - # @return [::String] - # Required. A user-provided entity ID. It is mutable, and will be used as the - # published table name. Specifying a new ID in an update entity - # request will override the existing value. - # The ID must contain only letters (a-z, A-Z), numbers (0-9), and - # underscores, and consist of 256 or fewer characters. - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag associated with the entity, which can be retrieved with - # a [GetEntity][] request. Required for update and delete requests. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Entity::Type] - # Required. Immutable. The type of entity. - # @!attribute [rw] asset - # @return [::String] - # Required. Immutable. The ID of the asset associated with the storage - # location containing the entity data. The entity must be with in the same - # zone with the asset. - # @!attribute [rw] data_path - # @return [::String] - # Required. Immutable. The storage path of the entity data. - # For Cloud Storage data, this is the fully-qualified path to the entity, - # such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - # the table resource, such as - # `projects/project_id/datasets/dataset_id/tables/table_id`. - # @!attribute [rw] data_path_pattern - # @return [::String] - # Optional. The set of items within the data path constituting the data in - # the entity, represented as a glob path. Example: - # `gs://bucket/path/to/data/**/*.csv`. - # @!attribute [r] catalog_entry - # @return [::String] - # Output only. The name of the associated Data Catalog entry. - # @!attribute [rw] system - # @return [::Google::Cloud::Dataplex::V1::StorageSystem] - # Required. Immutable. Identifies the storage system of the entity data. - # @!attribute [rw] format - # @return [::Google::Cloud::Dataplex::V1::StorageFormat] - # Required. Identifies the storage format of the entity data. - # It does not apply to entities with data stored in BigQuery. - # @!attribute [r] compatibility - # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus] - # Output only. Metadata stores that the entity is compatible with. - # @!attribute [r] access - # @return [::Google::Cloud::Dataplex::V1::StorageAccess] - # Output only. Identifies the access mechanism to the entity. Not user - # settable. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated unique ID for the Entity. This ID will be - # different if the Entity is deleted and re-created with the same name. - # @!attribute [rw] schema - # @return [::Google::Cloud::Dataplex::V1::Schema] - # Required. The description of the data structure and layout. - # The schema is not included in list responses. It is only included in - # `SCHEMA` and `FULL` entity views of a `GetEntity` response. - class Entity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Provides compatibility information for various metadata stores. - # @!attribute [r] hive_metastore - # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] - # Output only. Whether this entity is compatible with Hive Metastore. - # @!attribute [r] bigquery - # @return [::Google::Cloud::Dataplex::V1::Entity::CompatibilityStatus::Compatibility] - # Output only. Whether this entity is compatible with BigQuery. - class CompatibilityStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Provides compatibility information for a specific metadata store. - # @!attribute [r] compatible - # @return [::Boolean] - # Output only. Whether the entity is compatible and can be represented in - # the metadata store. - # @!attribute [r] reason - # @return [::String] - # Output only. Provides additional detail if the entity is incompatible - # with the metadata store. - class Compatibility - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The type of entity. - module Type - # Type unspecified. - TYPE_UNSPECIFIED = 0 - - # Structured and semi-structured data. - TABLE = 1 - - # Unstructured data. - FILESET = 2 - end - end - - # Represents partition metadata contained within entity instances. - # @!attribute [r] name - # @return [::String] - # Output only. Partition values used in the HTTP URL must be - # double encoded. For example, `url_encode(url_encode(value))` can be used - # to encode "US:CA/CA#Sunnyvale so that the request URL ends - # with "/partitions/US%253ACA/CA%2523Sunnyvale". - # The name field in the response retains the encoded format. - # @!attribute [rw] values - # @return [::Array<::String>] - # Required. Immutable. The set of values representing the partition, which - # correspond to the partition schema defined in the parent entity. - # @!attribute [rw] location - # @return [::String] - # Required. Immutable. The location of the entity data within the partition, - # for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - # `projects//datasets//tables/` - # @!attribute [rw] etag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. The etag for this partition. - class Partition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Schema information describing the structure and layout of the data. - # @!attribute [rw] user_managed - # @return [::Boolean] - # Required. Set to `true` if user-managed or `false` if managed by Dataplex - # Universal Catalog. The default is `false` (managed by Dataplex Universal - # Catalog). - # - # - Set to `false`to enable Dataplex Universal Catalog discovery to update - # the schema. - # including new data discovery, schema inference, and schema evolution. - # Users retain the ability to input and edit the schema. Dataplex Universal - # Catalog treats schema input by the user as though produced by a previous - # Dataplex Universal Catalog discovery operation, and it will evolve the - # schema and take action based on that treatment. - # - # - Set to `true` to fully manage the entity - # schema. This setting guarantees that Dataplex Universal Catalog will not - # change schema fields. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] - # Optional. The sequence of fields describing data in table entities. - # **Note:** BigQuery SchemaFields are immutable. - # @!attribute [rw] partition_fields - # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::PartitionField>] - # Optional. The sequence of fields describing the partition structure in - # entities. If this field is empty, there are no partitions within the data. - # @!attribute [rw] partition_style - # @return [::Google::Cloud::Dataplex::V1::Schema::PartitionStyle] - # Optional. The structure of paths containing partition data within the - # entity. - class Schema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a column field within a table schema. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the field. Must contain only letters, numbers and - # underscores, with a maximum length of 767 characters, - # and must begin with a letter or underscore. - # @!attribute [rw] description - # @return [::String] - # Optional. User friendly field description. Must be less than or equal to - # 1024 characters. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Schema::Type] - # Required. The type of field. - # @!attribute [rw] mode - # @return [::Google::Cloud::Dataplex::V1::Schema::Mode] - # Required. Additional field semantics. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Dataplex::V1::Schema::SchemaField>] - # Optional. Any nested field for complex types. - class SchemaField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a key field within the entity's partition structure. You could - # have up to 20 partition fields, but only the first 10 partitions have the - # filtering ability due to performance consideration. **Note:** - # Partition fields are immutable. - # @!attribute [rw] name - # @return [::String] - # Required. Partition field name must consist of letters, numbers, and - # underscores only, with a maximum of length of 256 characters, and must - # begin with a letter or underscore.. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Schema::Type] - # Required. Immutable. The type of field. - class PartitionField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type information for fields in schemas and partition schemas. - module Type - # SchemaType unspecified. - TYPE_UNSPECIFIED = 0 - - # Boolean field. - BOOLEAN = 1 - - # Single byte numeric field. - BYTE = 2 - - # 16-bit numeric field. - INT16 = 3 - - # 32-bit numeric field. - INT32 = 4 - - # 64-bit numeric field. - INT64 = 5 - - # Floating point numeric field. - FLOAT = 6 - - # Double precision numeric field. - DOUBLE = 7 - - # Real value numeric field. - DECIMAL = 8 - - # Sequence of characters field. - STRING = 9 - - # Sequence of bytes field. - BINARY = 10 - - # Date and time field. - TIMESTAMP = 11 - - # Date field. - DATE = 12 - - # Time field. - TIME = 13 - - # Structured field. Nested fields that define the structure of the map. - # If all nested fields are nullable, this field represents a union. - RECORD = 14 - - # Null field that does not have values. - NULL = 100 - end - - # Additional qualifiers to define field semantics. - module Mode - # Mode unspecified. - MODE_UNSPECIFIED = 0 - - # The field has required semantics. - REQUIRED = 1 - - # The field has optional semantics, and may be null. - NULLABLE = 2 - - # The field has repeated (0 or more) semantics, and is a list of values. - REPEATED = 3 - end - - # The structure of paths within the entity, which represent partitions. - module PartitionStyle - # PartitionStyle unspecified - PARTITION_STYLE_UNSPECIFIED = 0 - - # Partitions are hive-compatible. - # Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`, - # `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`. - HIVE_COMPATIBLE = 1 - end - end - - # Describes the format of the data within its storage location. - # @!attribute [r] format - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::Format] - # Output only. The data format associated with the stored data, which - # represents content type values. The value is inferred from mime type. - # @!attribute [rw] compression_format - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CompressionFormat] - # Optional. The compression type associated with the stored data. - # If unspecified, the data is uncompressed. - # @!attribute [rw] mime_type - # @return [::String] - # Required. The mime type descriptor for the data. Must match the pattern - # \\{type}/\\{subtype}. Supported values: - # - # - application/x-parquet - # - application/x-avro - # - application/x-orc - # - application/x-tfrecord - # - application/x-parquet+iceberg - # - application/x-avro+iceberg - # - application/x-orc+iceberg - # - application/json - # - application/\\{subtypes} - # - text/csv - # - text/ - # - image/\\{image subtype} - # - video/\\{video subtype} - # - audio/\\{audio subtype} - # @!attribute [rw] csv - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::CsvOptions] - # Optional. Additional information about CSV formatted data. - # - # Note: The following fields are mutually exclusive: `csv`, `json`, `iceberg`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] json - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::JsonOptions] - # Optional. Additional information about CSV formatted data. - # - # Note: The following fields are mutually exclusive: `json`, `csv`, `iceberg`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] iceberg - # @return [::Google::Cloud::Dataplex::V1::StorageFormat::IcebergOptions] - # Optional. Additional information about iceberg tables. - # - # Note: The following fields are mutually exclusive: `iceberg`, `csv`, `json`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class StorageFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes CSV and similar semi-structured data formats. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. Accepts "US-ASCII", - # "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. Defaults to 0. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter used to separate values. Defaults to ','. - # @!attribute [rw] quote - # @return [::String] - # Optional. The character used to quote column values. Accepts '"' - # (double quotation mark) or ''' (single quotation mark). Defaults to - # '"' (double quotation mark) if unspecified. - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - # and "ISO-8859-1". Defaults to UTF-8 if not specified. - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes Iceberg data format. - # @!attribute [rw] metadata_location - # @return [::String] - # Optional. The location of where the iceberg metadata is present, must be - # within the table path - class IcebergOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specific file format of the data. - module Format - # Format unspecified. - FORMAT_UNSPECIFIED = 0 - - # Parquet-formatted structured data. - PARQUET = 1 - - # Avro-formatted structured data. - AVRO = 2 - - # Orc-formatted structured data. - ORC = 3 - - # Csv-formatted semi-structured data. - CSV = 100 - - # Json-formatted semi-structured data. - JSON = 101 - - # Image data formats (such as jpg and png). - IMAGE = 200 - - # Audio data formats (such as mp3, and wav). - AUDIO = 201 - - # Video data formats (such as mp4 and mpg). - VIDEO = 202 - - # Textual data formats (such as txt and xml). - TEXT = 203 - - # TensorFlow record format. - TFRECORD = 204 - - # Data that doesn't match a specific format. - OTHER = 1000 - - # Data of an unknown format. - UNKNOWN = 1001 - end - - # The specific compressed file format of the data. - module CompressionFormat - # CompressionFormat unspecified. Implies uncompressed data. - COMPRESSION_FORMAT_UNSPECIFIED = 0 - - # GZip compressed set of files. - GZIP = 2 - - # BZip2 compressed set of files. - BZIP2 = 3 - end - end - - # Describes the access mechanism of the data within its storage location. - # @!attribute [r] read - # @return [::Google::Cloud::Dataplex::V1::StorageAccess::AccessMode] - # Output only. Describes the read access mechanism of the data. Not user - # settable. - class StorageAccess - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Access Mode determines how data stored within the Entity is read. - module AccessMode - # Access mode unspecified. - ACCESS_MODE_UNSPECIFIED = 0 - - # Default. Data is accessed directly using storage APIs. - DIRECT = 1 - - # Data is accessed through a managed interface using BigQuery APIs. - MANAGED = 2 - end - end - - # Identifies the cloud system that manages the data storage. - module StorageSystem - # Storage system unspecified. - STORAGE_SYSTEM_UNSPECIFIED = 0 - - # The entity data is contained within a Cloud Storage bucket. - CLOUD_STORAGE = 1 - - # The entity data is contained within a BigQuery dataset. - BIGQUERY = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb deleted file mode 100644 index 2c082805a515..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/processing.rb +++ /dev/null @@ -1,137 +0,0 @@ -# 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 - # DataScan scheduling and trigger settings. - # @!attribute [rw] on_demand - # @return [::Google::Cloud::Dataplex::V1::Trigger::OnDemand] - # The scan runs once via `RunDataScan` API. - # - # 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`, `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 - - # The scan runs once via `RunDataScan` API. - class OnDemand - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The scan is scheduled to run periodically. - # @!attribute [rw] cron - # @return [::String] - # Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - # scans periodically. - # - # To explicitly set a timezone in the cron tab, apply a prefix in the - # cron tab: **"CRON_TZ=$\\{IANA_TIME_ZONE}"** or **"TZ=$\\{IANA_TIME_ZONE}"**. - # The **$\\{IANA_TIME_ZONE}** may only be a valid string from IANA time zone - # database - # ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - # For example, `CRON_TZ=America/New_York 1 * * * *`, or - # `TZ=America/New_York 1 * * * *`. - # - # This field is required for Schedule scans. - class Schedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. - # @!attribute [rw] entity - # @return [::String] - # Immutable. The Dataplex Universal Catalog entity that represents the data - # source (e.g. BigQuery table) for DataScan, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - # - # Note: The following fields are mutually exclusive: `entity`, `resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource - # @return [::String] - # Immutable. The service-qualified full resource name of the cloud resource - # for a DataScan job to scan against. The field could either be: Cloud - # Storage bucket for DataDiscoveryScan Format: - # //storage.googleapis.com/projects/PROJECT_ID/buckets/BUCKET_ID - # or - # BigQuery table of type "TABLE" for - # DataProfileScan/DataQualityScan/DataDocumentationScan Format: - # //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - # - # Note: The following fields are mutually exclusive: `resource`, `entity`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data scanned during processing (e.g. in incremental DataScan) - # @!attribute [rw] incremental_field - # @return [::Google::Cloud::Dataplex::V1::ScannedData::IncrementalField] - # The range denoted by values of an incremental field - class ScannedData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A data range denoted by a pair of start/end values of a field. - # @!attribute [r] field - # @return [::String] - # Output only. The field that contains values which monotonically increases - # over time (e.g. a timestamp column). - # @!attribute [r] start - # @return [::String] - # Output only. Value that marks the start of the range. - # @!attribute [r] end - # @return [::String] - # Output only. Value that marks the end of the range. - class IncrementalField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb deleted file mode 100644 index c2a619b26687..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/resources.rb +++ /dev/null @@ -1,858 +0,0 @@ -# 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 lake is a centralized repository for managing enterprise data across the - # organization distributed across many cloud projects, and stored in a variety - # of storage services such as Google Cloud Storage and BigQuery. The resources - # attached to a lake are referred to as managed resources. Data within these - # managed resources can be structured or unstructured. A lake provides data - # admins with tools to organize, secure and manage their data at scale, and - # provides data scientists and data engineers an integrated experience to - # easily search, discover, analyze and transform data and associated metadata. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the lake, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the lake. This ID will - # be different if the lake is deleted and re-created with the same name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the lake was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the lake was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the lake. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the lake. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the lake. - # @!attribute [r] service_account - # @return [::String] - # Output only. Service account associated with this lake. This service - # account must be authorized to access or operate on resources managed by the - # lake. - # @!attribute [rw] metastore - # @return [::Google::Cloud::Dataplex::V1::Lake::Metastore] - # Optional. Settings to manage lake and Dataproc Metastore service instance - # association. - # @!attribute [r] asset_status - # @return [::Google::Cloud::Dataplex::V1::AssetStatus] - # Output only. Aggregated status of the underlying assets of the lake. - # @!attribute [r] metastore_status - # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus] - # Output only. Metastore status of the lake. - class Lake - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings to manage association of Dataproc Metastore with a lake. - # @!attribute [rw] service - # @return [::String] - # Optional. A relative reference to the Dataproc Metastore - # (https://cloud.google.com/dataproc-metastore/docs) service associated - # with the lake: - # `projects/{project_id}/locations/{location_id}/services/{service_id}` - class Metastore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of Lake and Dataproc Metastore service instance association. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Lake::MetastoreStatus::State] - # Current state of association. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current status. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the metastore status of the lake. - # @!attribute [rw] endpoint - # @return [::String] - # The URI of the endpoint used to access the Metastore service. - class MetastoreStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Current state of association. - module State - # Unspecified. - STATE_UNSPECIFIED = 0 - - # A Metastore service instance is not associated with the lake. - NONE = 1 - - # A Metastore service instance is attached to the lake. - READY = 2 - - # Attach/detach is in progress. - UPDATING = 3 - - # Attach/detach could not be done due to errors. - ERROR = 4 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Aggregated status of the underlying assets of a lake or zone. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - # @!attribute [rw] active_assets - # @return [::Integer] - # Number of active assets. - # @!attribute [rw] security_policy_applying_assets - # @return [::Integer] - # Number of assets that are in process of updating the security policy on - # attached resources. - class AssetStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A zone represents a logical group of related assets within a lake. A zone can - # be used to map to organizational structure or represent stages of data - # readiness from raw to curated. It provides managing behavior that is shared - # or inherited by all contained assets. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the zone, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the zone. This ID will - # be different if the zone is deleted and re-created with the same name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the zone was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the zone was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the zone. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the zone. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the zone. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Zone::Type] - # Required. Immutable. The type of the zone. - # @!attribute [rw] discovery_spec - # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec] - # Optional. Specification of the discovery feature applied to data in this - # zone. - # @!attribute [rw] resource_spec - # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec] - # Required. Specification of the resources that are referenced by the assets - # within this zone. - # @!attribute [r] asset_status - # @return [::Google::Cloud::Dataplex::V1::AssetStatus] - # Output only. Aggregated status of the underlying assets of the zone. - class Zone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Settings for resources attached as assets within a zone. - # @!attribute [rw] location_type - # @return [::Google::Cloud::Dataplex::V1::Zone::ResourceSpec::LocationType] - # Required. Immutable. The location type of the resources that are allowed - # to be attached to the assets within this zone. - class ResourceSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Location type of the resources attached to a zone. - module LocationType - # Unspecified location type. - LOCATION_TYPE_UNSPECIFIED = 0 - - # Resources that are associated with a single region. - SINGLE_REGION = 1 - - # Resources that are associated with a multi-region location. - MULTI_REGION = 2 - end - end - - # Settings to manage the metadata discovery and publishing in a zone. - # @!attribute [rw] enabled - # @return [::Boolean] - # Required. Whether discovery is enabled. - # @!attribute [rw] include_patterns - # @return [::Array<::String>] - # Optional. The list of patterns to apply for selecting data to include - # during discovery if only a subset of the data should considered. For - # Cloud Storage bucket assets, these are interpreted as glob patterns used - # to match object names. For BigQuery dataset assets, these are interpreted - # as patterns to match table names. - # @!attribute [rw] exclude_patterns - # @return [::Array<::String>] - # Optional. The list of patterns to apply for selecting data to exclude - # during discovery. For Cloud Storage bucket assets, these are interpreted - # as glob patterns used to match object names. For BigQuery dataset assets, - # these are interpreted as patterns to match table names. - # @!attribute [rw] csv_options - # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::CsvOptions] - # Optional. Configuration for CSV data. - # @!attribute [rw] json_options - # @return [::Google::Cloud::Dataplex::V1::Zone::DiscoverySpec::JsonOptions] - # Optional. Configuration for Json data. - # @!attribute [rw] schedule - # @return [::String] - # Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - # running discovery periodically. Successive discovery runs must be - # scheduled at least 60 minutes apart. The default value is to run - # discovery every 60 minutes. - # - # To explicitly set a timezone to the cron tab, apply a prefix in the - # cron tab: "CRON_TZ=$\\{IANA_TIME_ZONE}" or TZ=$\\{IANA_TIME_ZONE}". - # The $\\{IANA_TIME_ZONE} may only be a valid string from IANA time zone - # database. For example, `CRON_TZ=America/New_York 1 * * * *`, or - # `TZ=America/New_York 1 * * * *`. - class DiscoverySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describe CSV and similar semi-structured data formats. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter being used to separate values. This defaults to - # ','. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # Optional. Whether to disable the inference of data type for CSV data. - # If true, all columns will be registered as strings. - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # Optional. Whether to disable the inference of data type for Json data. - # If true, all columns will be registered as their primitive types - # (strings, number or boolean). - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of zone. - module Type - # Zone type not specified. - TYPE_UNSPECIFIED = 0 - - # A zone that contains data that needs further processing before it is - # considered generally ready for consumption and analytics workloads. - RAW = 1 - - # A zone that contains data that is considered to be ready for broader - # consumption and analytics workloads. Curated structured data stored in - # Cloud Storage must conform to certain file formats (parquet, avro and - # orc) and organized in a hive-compatible directory layout. - CURATED = 2 - end - end - - # Action represents an issue requiring administrator action for resolution. - # @!attribute [rw] category - # @return [::Google::Cloud::Dataplex::V1::Action::Category] - # The category of issue associated with the action. - # @!attribute [rw] issue - # @return [::String] - # Detailed description of the issue requiring action. - # @!attribute [rw] detect_time - # @return [::Google::Protobuf::Timestamp] - # The time that the issue was detected. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the action, of the form: - # `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - # `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - # @!attribute [r] lake - # @return [::String] - # Output only. The relative resource name of the lake, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [r] zone - # @return [::String] - # Output only. The relative resource name of the zone, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [r] asset - # @return [::String] - # Output only. The relative resource name of the asset, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @!attribute [rw] data_locations - # @return [::Array<::String>] - # The list of data locations associated with this action. Cloud Storage - # locations are represented as URI paths(E.g. - # `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - # resource names(E.g. - # `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - # @!attribute [rw] invalid_data_format - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataFormat] - # Details for issues related to invalid or unsupported data formats. - # - # Note: The following fields are mutually exclusive: `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] incompatible_data_schema - # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema] - # Details for issues related to incompatible schemas detected within data. - # - # Note: The following fields are mutually exclusive: `incompatible_data_schema`, `invalid_data_format`, `invalid_data_partition`, `missing_data`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] invalid_data_partition - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition] - # Details for issues related to invalid or unsupported data partition - # structure. - # - # Note: The following fields are mutually exclusive: `invalid_data_partition`, `invalid_data_format`, `incompatible_data_schema`, `missing_data`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] missing_data - # @return [::Google::Cloud::Dataplex::V1::Action::MissingData] - # Details for issues related to absence of data within managed resources. - # - # Note: The following fields are mutually exclusive: `missing_data`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] missing_resource - # @return [::Google::Cloud::Dataplex::V1::Action::MissingResource] - # Details for issues related to absence of a managed resource. - # - # Note: The following fields are mutually exclusive: `missing_resource`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `unauthorized_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] unauthorized_resource - # @return [::Google::Cloud::Dataplex::V1::Action::UnauthorizedResource] - # Details for issues related to lack of permissions to access data - # resources. - # - # Note: The following fields are mutually exclusive: `unauthorized_resource`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `missing_resource`, `failed_security_policy_apply`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] failed_security_policy_apply - # @return [::Google::Cloud::Dataplex::V1::Action::FailedSecurityPolicyApply] - # Details for issues related to applying security policy. - # - # Note: The following fields are mutually exclusive: `failed_security_policy_apply`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `missing_resource`, `unauthorized_resource`, `invalid_data_organization`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] invalid_data_organization - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataOrganization] - # Details for issues related to invalid data arrangement. - # - # Note: The following fields are mutually exclusive: `invalid_data_organization`, `invalid_data_format`, `incompatible_data_schema`, `invalid_data_partition`, `missing_data`, `missing_resource`, `unauthorized_resource`, `failed_security_policy_apply`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Action - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Action details for resource references in assets that cannot be located. - class MissingResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for unauthorized resource issues raised to indicate that the - # service account associated with the lake instance is not authorized to - # access or manage the resource associated with an asset. - class UnauthorizedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Failed to apply security policy to the managed resource(s) under a - # lake, zone or an asset. For a lake or zone resource, one or more underlying - # assets has a failure applying security policy to the associated managed - # resource. - # @!attribute [rw] asset - # @return [::String] - # Resource name of one of the assets with failing security policy - # application. Populated for a lake or zone resource only. - class FailedSecurityPolicyApply - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for invalid or unsupported data files detected by discovery. - # @!attribute [rw] sampled_data_locations - # @return [::Array<::String>] - # The list of data locations sampled and used for format/schema - # inference. - # @!attribute [rw] expected_format - # @return [::String] - # The expected data format of the entity. - # @!attribute [rw] new_format - # @return [::String] - # The new unexpected data format within the entity. - class InvalidDataFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for incompatible schemas detected by discovery. - # @!attribute [rw] table - # @return [::String] - # The name of the table containing invalid data. - # @!attribute [rw] existing_schema - # @return [::String] - # The existing and expected schema of the table. The schema is provided as - # a JSON formatted structure listing columns and data types. - # @!attribute [rw] new_schema - # @return [::String] - # The new and incompatible schema within the table. The schema is provided - # as a JSON formatted structured listing columns and data types. - # @!attribute [rw] sampled_data_locations - # @return [::Array<::String>] - # The list of data locations sampled and used for format/schema - # inference. - # @!attribute [rw] schema_change - # @return [::Google::Cloud::Dataplex::V1::Action::IncompatibleDataSchema::SchemaChange] - # Whether the action relates to a schema that is incompatible or modified. - class IncompatibleDataSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Whether the action relates to a schema that is incompatible or modified. - module SchemaChange - # Schema change unspecified. - SCHEMA_CHANGE_UNSPECIFIED = 0 - - # Newly discovered schema is incompatible with existing schema. - INCOMPATIBLE = 1 - - # Newly discovered schema has changed from existing schema for data in a - # curated zone. - MODIFIED = 2 - end - end - - # Action details for invalid or unsupported partitions detected by discovery. - # @!attribute [rw] expected_structure - # @return [::Google::Cloud::Dataplex::V1::Action::InvalidDataPartition::PartitionStructure] - # The issue type of InvalidDataPartition. - class InvalidDataPartition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The expected partition structure. - module PartitionStructure - # PartitionStructure unspecified. - PARTITION_STRUCTURE_UNSPECIFIED = 0 - - # Consistent hive-style partition definition (both raw and curated zone). - CONSISTENT_KEYS = 1 - - # Hive style partition definition (curated zone only). - HIVE_STYLE_KEYS = 2 - end - end - - # Action details for absence of data detected by discovery. - class MissingData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action details for invalid data arrangement. - class InvalidDataOrganization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The category of issues. - module Category - # Unspecified category. - CATEGORY_UNSPECIFIED = 0 - - # Resource management related issues. - RESOURCE_MANAGEMENT = 1 - - # Security policy related issues. - SECURITY_POLICY = 2 - - # Data and discovery related issues. - DATA_DISCOVERY = 3 - end - end - - # An asset represents a cloud resource that is being managed within a lake as a - # member of a zone. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the asset, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the asset. This ID - # will be different if the asset is deleted and re-created with the same - # name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the asset was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the asset was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User defined labels for the asset. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the asset. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the asset. - # @!attribute [rw] resource_spec - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec] - # Required. Specification of the resource that is referenced by this asset. - # @!attribute [r] resource_status - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus] - # Output only. Status of the resource referenced by this asset. - # @!attribute [r] security_status - # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus] - # Output only. Status of the security policy applied to resource referenced - # by this asset. - # @!attribute [rw] discovery_spec - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec] - # Optional. Specification of the discovery feature applied to data referenced - # by this asset. When this spec is left unset, the asset will use the spec - # set on the parent zone. - # @!attribute [r] discovery_status - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus] - # Output only. Status of the discovery feature applied to data referenced by - # this asset. - class Asset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Security policy status of the asset. Data security policy, i.e., readers, - # writers & owners, should be specified in the lake/zone/asset IAM policy. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Asset::SecurityStatus::State] - # The current state of the security policy applied to the attached - # resource. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current state. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - class SecurityStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the security policy. - module State - # State unspecified. - STATE_UNSPECIFIED = 0 - - # Security policy has been successfully applied to the attached resource. - READY = 1 - - # Security policy is in the process of being applied to the attached - # resource. - APPLYING = 2 - - # Security policy could not be applied to the attached resource due to - # errors. - ERROR = 3 - end - end - - # Settings to manage the metadata discovery and publishing for an asset. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Whether discovery is enabled. - # @!attribute [rw] include_patterns - # @return [::Array<::String>] - # Optional. The list of patterns to apply for selecting data to include - # during discovery if only a subset of the data should considered. For - # Cloud Storage bucket assets, these are interpreted as glob patterns used - # to match object names. For BigQuery dataset assets, these are interpreted - # as patterns to match table names. - # @!attribute [rw] exclude_patterns - # @return [::Array<::String>] - # Optional. The list of patterns to apply for selecting data to exclude - # during discovery. For Cloud Storage bucket assets, these are interpreted - # as glob patterns used to match object names. For BigQuery dataset assets, - # these are interpreted as patterns to match table names. - # @!attribute [rw] csv_options - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::CsvOptions] - # Optional. Configuration for CSV data. - # @!attribute [rw] json_options - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoverySpec::JsonOptions] - # Optional. Configuration for Json data. - # @!attribute [rw] schedule - # @return [::String] - # Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - # running discovery periodically. Successive discovery runs must be - # scheduled at least 60 minutes apart. The default value is to run - # discovery every 60 minutes. - # - # To explicitly set a timezone to the cron tab, apply a prefix in the - # cron tab: "CRON_TZ=$\\{IANA_TIME_ZONE}" or TZ=$\\{IANA_TIME_ZONE}". - # The $\\{IANA_TIME_ZONE} may only be a valid string from IANA time zone - # database. For example, `CRON_TZ=America/New_York 1 * * * *`, or - # `TZ=America/New_York 1 * * * *`. - class DiscoverySpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describe CSV and similar semi-structured data formats. - # @!attribute [rw] header_rows - # @return [::Integer] - # Optional. The number of rows to interpret as header rows that should be - # skipped when reading data rows. - # @!attribute [rw] delimiter - # @return [::String] - # Optional. The delimiter being used to separate values. This defaults to - # ','. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # Optional. Whether to disable the inference of data type for CSV data. - # If true, all columns will be registered as strings. - class CsvOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describe JSON data format. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The character encoding of the data. The default is UTF-8. - # @!attribute [rw] disable_type_inference - # @return [::Boolean] - # Optional. Whether to disable the inference of data type for Json data. - # If true, all columns will be registered as their primitive types - # (strings, number or boolean). - class JsonOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Identifies the cloud resource that is referenced by this asset. - # @!attribute [rw] name - # @return [::String] - # Immutable. Relative name of the cloud resource that contains the data - # that is being managed within a lake. For example: - # `projects/{project_number}/buckets/{bucket_id}` - # `projects/{project_number}/datasets/{dataset_id}` - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::Type] - # Required. Immutable. Type of resource. - # @!attribute [rw] read_access_mode - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceSpec::AccessMode] - # Optional. Determines how read permissions are handled for each asset and - # their associated tables. Only available to storage buckets assets. - class ResourceSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of resource. - module Type - # Type not specified. - TYPE_UNSPECIFIED = 0 - - # Cloud Storage bucket. - STORAGE_BUCKET = 1 - - # BigQuery dataset. - BIGQUERY_DATASET = 2 - end - - # Access Mode determines how data stored within the resource is read. This - # is only applicable to storage bucket assets. - module AccessMode - # Access mode unspecified. - ACCESS_MODE_UNSPECIFIED = 0 - - # Default. Data is accessed directly using storage APIs. - DIRECT = 1 - - # Data is accessed through a managed interface using BigQuery APIs. - MANAGED = 2 - end - end - - # Status of the resource referenced by an asset. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Asset::ResourceStatus::State] - # The current state of the managed resource. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current state. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - # @!attribute [r] managed_access_identity - # @return [::String] - # Output only. Service account associated with the BigQuery Connection. - class ResourceStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of a resource. - module State - # State unspecified. - STATE_UNSPECIFIED = 0 - - # Resource does not have any errors. - READY = 1 - - # Resource has errors. - ERROR = 2 - end - end - - # Status of discovery for an asset. - # @!attribute [rw] state - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::State] - # The current status of the discovery feature. - # @!attribute [rw] message - # @return [::String] - # Additional information about the current state. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Last update time of the status. - # @!attribute [rw] last_run_time - # @return [::Google::Protobuf::Timestamp] - # The start time of the last discovery run. - # @!attribute [rw] stats - # @return [::Google::Cloud::Dataplex::V1::Asset::DiscoveryStatus::Stats] - # Data Stats of the asset reported by discovery. - # @!attribute [rw] last_run_duration - # @return [::Google::Protobuf::Duration] - # The duration of the last discovery run. - class DiscoveryStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The aggregated data statistics for the asset reported by discovery. - # @!attribute [rw] data_items - # @return [::Integer] - # The count of data items within the referenced resource. - # @!attribute [rw] data_size - # @return [::Integer] - # The number of stored data bytes within the referenced resource. - # @!attribute [rw] tables - # @return [::Integer] - # The count of table entities within the referenced resource. - # @!attribute [rw] filesets - # @return [::Integer] - # The count of fileset entities within the referenced resource. - class Stats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Current state of discovery. - module State - # State is unspecified. - STATE_UNSPECIFIED = 0 - - # Discovery for the asset is scheduled. - SCHEDULED = 1 - - # Discovery for the asset is running. - IN_PROGRESS = 2 - - # Discovery for the asset is currently paused (e.g. due to a lack - # of available resources). It will be automatically resumed. - PAUSED = 3 - - # Discovery for the asset is disabled. - DISABLED = 5 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # State of a resource. - module State - # State is not specified. - STATE_UNSPECIFIED = 0 - - # Resource is active, i.e., ready to use. - ACTIVE = 1 - - # Resource is under creation. - CREATING = 2 - - # Resource is under deletion. - DELETING = 3 - - # Resource is active but has unresolved actions. - ACTION_REQUIRED = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb deleted file mode 100644 index dcf73dffbd3d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/security.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 - # ResourceAccessSpec holds the access control configuration to be enforced - # on the resources, for example, Cloud Storage bucket, BigQuery dataset, - # BigQuery table. - # @!attribute [rw] readers - # @return [::Array<::String>] - # Optional. The format of strings follows the pattern followed by IAM in the - # bindings. user:\\{email}, serviceAccount:\\{email} group:\\{email}. - # The set of principals to be granted reader role on the resource. - # @!attribute [rw] writers - # @return [::Array<::String>] - # Optional. The set of principals to be granted writer role on the resource. - # @!attribute [rw] owners - # @return [::Array<::String>] - # Optional. The set of principals to be granted owner role on the resource. - class ResourceAccessSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataAccessSpec holds the access control configuration to be enforced on data - # stored within resources (eg: rows, columns in BigQuery Tables). When - # associated with data, the data is only accessible to - # principals explicitly granted access through the DataAccessSpec. Principals - # with access to the containing resource are not implicitly granted access. - # @!attribute [rw] readers - # @return [::Array<::String>] - # Optional. The format of strings follows the pattern followed by IAM in the - # bindings. user:\\{email}, serviceAccount:\\{email} group:\\{email}. - # The set of principals to be granted reader role on data - # stored within resources. - class DataAccessSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb deleted file mode 100644 index 5fb2058b462a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/service.rb +++ /dev/null @@ -1,655 +0,0 @@ -# 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 - # Create lake request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the lake location, of the form: - # projects/\\{project_number}/locations/\\{location_id} - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] lake_id - # @return [::String] - # Required. Lake identifier. - # This ID will be used to generate names such as database and dataset names - # when publishing metadata to Hive Metastore and BigQuery. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique within the customer project / location. - # @!attribute [rw] lake - # @return [::Google::Cloud::Dataplex::V1::Lake] - # Required. Lake resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update lake request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] lake - # @return [::Google::Cloud::Dataplex::V1::Lake] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete lake request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - class DeleteLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List lakes request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the lake location, of the form: - # `projects/{project_number}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of Lakes to return. The service may return fewer - # than this value. If unspecified, at most 10 lakes will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListLakes` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListLakes` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListLakesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List lakes response. - # @!attribute [rw] lakes - # @return [::Array<::Google::Cloud::Dataplex::V1::Lake>] - # Lakes under the given parent location. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListLakesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List lake actions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of actions to return. The service may return fewer - # than this value. If unspecified, at most 10 actions will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListLakeActions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListLakeActions` must match the call that provided - # the page token. - class ListLakeActionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List actions response. - # @!attribute [rw] actions - # @return [::Array<::Google::Cloud::Dataplex::V1::Action>] - # Actions under the given parent lake/zone/asset. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListActionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get lake request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - class GetLakeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create zone request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] zone_id - # @return [::String] - # Required. Zone identifier. - # This ID will be used to generate names such as database and dataset names - # when publishing metadata to Hive Metastore and BigQuery. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique across all lakes from all locations in a project. - # * Must not be one of the reserved IDs (i.e. "default", "global-temp") - # @!attribute [rw] zone - # @return [::Google::Cloud::Dataplex::V1::Zone] - # Required. Zone resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update zone request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] zone - # @return [::Google::Cloud::Dataplex::V1::Zone] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete zone request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - class DeleteZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List zones request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of zones to return. The service may return fewer - # than this value. If unspecified, at most 10 zones will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListZones` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListZones` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListZonesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List zones response. - # @!attribute [rw] zones - # @return [::Array<::Google::Cloud::Dataplex::V1::Zone>] - # Zones under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListZonesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List zone actions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of actions to return. The service may return fewer - # than this value. If unspecified, at most 10 actions will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListZoneActions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListZoneActions` must match the call that provided - # the page token. - class ListZoneActionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get zone request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - class GetZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create asset request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] asset_id - # @return [::String] - # Required. Asset identifier. - # This ID will be used to generate names such as table names when publishing - # metadata to Hive Metastore and BigQuery. - # * Must contain only lowercase letters, numbers and hyphens. - # * Must start with a letter. - # * Must end with a number or a letter. - # * Must be between 1-63 characters. - # * Must be unique within the zone. - # @!attribute [rw] asset - # @return [::Google::Cloud::Dataplex::V1::Asset] - # Required. Asset resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update asset request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] asset - # @return [::Google::Cloud::Dataplex::V1::Asset] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete asset request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - class DeleteAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List assets request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent zone: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of asset to return. The service may return fewer - # than this value. If unspecified, at most 10 assets will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListAssets` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListAssets` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List assets response. - # @!attribute [rw] assets - # @return [::Array<::Google::Cloud::Dataplex::V1::Asset>] - # Asset under the given parent zone. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List asset actions request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of actions to return. The service may return fewer - # than this value. If unspecified, at most 10 actions will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListAssetActions` call. - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters provided to `ListAssetActions` must match the call that provided - # the page token. - class ListAssetActionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get asset request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the asset: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - class GetAssetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of a long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Create task request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] task_id - # @return [::String] - # Required. Task identifier. - # @!attribute [rw] task - # @return [::Google::Cloud::Dataplex::V1::Task] - # Required. Task resource. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class CreateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Update task request. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] task - # @return [::Google::Cloud::Dataplex::V1::Task] - # Required. Update description. - # Only fields specified in `update_mask` are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. Only validate the request, but do not perform mutations. - # The default is false. - class UpdateTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Delete task request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - class DeleteTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List tasks request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent lake: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of tasks to return. The service may return fewer - # than this value. If unspecified, at most 10 tasks will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListZones` call. Provide - # this to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListZones` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter request. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Order by fields for the result. - class ListTasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List tasks response. - # @!attribute [rw] tasks - # @return [::Array<::Google::Cloud::Dataplex::V1::Task>] - # Tasks under the given parent lake. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable_locations - # @return [::Array<::String>] - # Locations that could not be reached. - class ListTasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get task request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - class GetTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Get job request. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - class GetJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the task: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the task. If the map is left empty, the - # task will run with existing labels from task definition. If the map - # contains an entry with a new key, the same will be added to existing set of - # labels. If the map contains an entry with an existing label key in task - # definition, the task will run with new label value for that entry. Clearing - # an existing label will require label value to be explicitly set to a hyphen - # "-". The label value cannot be empty. - # @!attribute [rw] args - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Execution spec arguments. If the map is left empty, the task will - # run with existing execution spec args from task definition. If the map - # contains an entry with a new key, the same will be added to existing set of - # args. If the map contains an entry with an existing arg key in task - # definition, the task will run with new arg value for that entry. Clearing - # an existing arg will require arg value to be explicitly set to a hyphen - # "-". The arg value cannot be empty. - class RunTaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ArgsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] job - # @return [::Google::Cloud::Dataplex::V1::Job] - # Jobs created by RunTask API. - class RunTaskResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List jobs request. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent environment: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of jobs to return. The service may return fewer - # than this value. If unspecified, at most 10 jobs will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Page token received from a previous `ListJobs` call. Provide this - # to retrieve the subsequent page. When paginating, all other parameters - # provided to `ListJobs` must match the call that provided the page - # token. - class ListJobsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List jobs response. - # @!attribute [rw] jobs - # @return [::Array<::Google::Cloud::Dataplex::V1::Job>] - # Jobs under a given task. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - class ListJobsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cancel task jobs. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the job: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - class CancelJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb deleted file mode 100644 index c59483351f40..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/cloud/dataplex/v1/tasks.rb +++ /dev/null @@ -1,452 +0,0 @@ -# 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 task represents a user-visible job. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the task, of the form: - # projects/\\{project_number}/locations/\\{location_id}/lakes/\\{lake_id}/ - # tasks/\\{task_id}. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the task. This ID will - # be different if the task is deleted and re-created with the same name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the task was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the task was last updated. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the task. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::State] - # Output only. Current state of the task. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined labels for the task. - # @!attribute [rw] trigger_spec - # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec] - # Required. Spec related to how often and when a task should be triggered. - # @!attribute [rw] execution_spec - # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] - # Required. Spec related to how a task is executed. - # @!attribute [r] execution_status - # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionStatus] - # Output only. Status of the latest task executions. - # @!attribute [rw] spark - # @return [::Google::Cloud::Dataplex::V1::Task::SparkTaskConfig] - # Config related to running custom Spark tasks. - # - # Note: The following fields are mutually exclusive: `spark`, `notebook`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] notebook - # @return [::Google::Cloud::Dataplex::V1::Task::NotebookTaskConfig] - # Config related to running scheduled Notebooks. - # - # Note: The following fields are mutually exclusive: `notebook`, `spark`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Task - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for the underlying infrastructure used to run workloads. - # @!attribute [rw] batch - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::BatchComputeResources] - # Compute resources needed for a Task when using Dataproc Serverless. - # @!attribute [rw] container_image - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::ContainerImageRuntime] - # Container Image Runtime Configuration. - # @!attribute [rw] vpc_network - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec::VpcNetwork] - # Vpc network. - class InfrastructureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Batch compute resources associated with the task. - # @!attribute [rw] executors_count - # @return [::Integer] - # Optional. Total number of job executors. - # Executor Count should be between 2 and 100. [Default=2] - # @!attribute [rw] max_executors_count - # @return [::Integer] - # Optional. Max configurable executors. - # If max_executors_count > executors_count, then auto-scaling is enabled. - # Max Executor Count should be between 2 and 1000. [Default=1000] - class BatchComputeResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container Image Runtime Configuration used with Batch execution. - # @!attribute [rw] image - # @return [::String] - # Optional. Container image to use. - # @!attribute [rw] java_jars - # @return [::Array<::String>] - # Optional. A list of Java JARS to add to the classpath. - # Valid input includes Cloud Storage URIs to Jar binaries. - # For example, gs://bucket-name/my/path/to/file.jar - # @!attribute [rw] python_packages - # @return [::Array<::String>] - # Optional. A list of python packages to be installed. - # Valid formats include Cloud Storage URI to a PIP installable library. - # For example, gs://bucket-name/my/path/to/lib.tar.gz - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Override to common configuration of open source components - # installed on the Dataproc cluster. The properties to set on daemon - # config files. Property keys are specified in `prefix:property` format, - # for example `core:hadoop.tmp.dir`. For more information, see [Cluster - # properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - class ContainerImageRuntime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Cloud VPC Network used to run the infrastructure. - # @!attribute [rw] network - # @return [::String] - # Optional. The Cloud VPC network in which the job is run. By default, - # the Cloud VPC network named Default within the project is used. - # - # Note: The following fields are mutually exclusive: `network`, `sub_network`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sub_network - # @return [::String] - # Optional. The Cloud VPC sub-network in which the job is run. - # - # Note: The following fields are mutually exclusive: `sub_network`, `network`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] network_tags - # @return [::Array<::String>] - # Optional. List of network tags to apply to the job. - class VpcNetwork - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Task scheduling and trigger settings. - # @!attribute [rw] type - # @return [::Google::Cloud::Dataplex::V1::Task::TriggerSpec::Type] - # Required. Immutable. Trigger type of the user-specified Task. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The first run of the task will be after this time. - # If not specified, the task will run shortly after being submitted if - # ON_DEMAND and based on the schedule if RECURRING. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Prevent the task from executing. - # This does not cancel already running tasks. It is intended to temporarily - # disable RECURRING tasks. - # @!attribute [rw] max_retries - # @return [::Integer] - # Optional. Number of retry attempts before aborting. - # Set to zero to never attempt to retry a failed task. - # @!attribute [rw] schedule - # @return [::String] - # Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - # running tasks periodically. To explicitly set a timezone to the cron - # tab, apply a prefix in the cron tab: "CRON_TZ=$\\{IANA_TIME_ZONE}" or - # "TZ=$\\{IANA_TIME_ZONE}". The $\\{IANA_TIME_ZONE} may only be a valid - # string from IANA time zone database. For example, - # `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * - # *`. This field is required for RECURRING tasks. - class TriggerSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Determines how often and when the job will run. - module Type - # Unspecified trigger type. - TYPE_UNSPECIFIED = 0 - - # The task runs one-time shortly after Task Creation. - ON_DEMAND = 1 - - # The task is scheduled to run periodically. - RECURRING = 2 - end - end - - # Execution related settings, like retry and service_account. - # @!attribute [rw] args - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The arguments to pass to the task. - # The args can use placeholders of the format $\\{placeholder} as - # part of key/value string. These will be interpolated before passing the - # args to the driver. Currently supported placeholders: - # - $\\{task_id} - # - $\\{job_time} - # To pass positional args, set the key as TASK_ARGS. The value should be a - # comma-separated string of all the positional arguments. To use a - # delimiter other than comma, refer to - # https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - # other keys being present in the args, then TASK_ARGS will be passed as - # the last argument. - # @!attribute [rw] service_account - # @return [::String] - # Required. Service account to use to execute a task. - # If not provided, the default Compute service account for the project is - # used. - # @!attribute [rw] project - # @return [::String] - # Optional. The project in which jobs are run. By default, the project - # containing the Lake is used. If a project is provided, the - # {::Google::Cloud::Dataplex::V1::Task::ExecutionSpec#service_account ExecutionSpec.service_account} - # must belong to this project. - # @!attribute [rw] max_job_execution_lifetime - # @return [::Google::Protobuf::Duration] - # Optional. The maximum duration after which the job execution is expired. - # @!attribute [rw] kms_key - # @return [::String] - # Optional. The Cloud KMS key to use for encryption, of the form: - # `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - class ExecutionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ArgsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # User-specified config for running a Spark task. - # @!attribute [rw] main_jar_file_uri - # @return [::String] - # The Cloud Storage URI of the jar file that contains the main class. - # The execution args are passed in as a sequence of named process - # arguments (`--key=value`). - # - # Note: The following fields are mutually exclusive: `main_jar_file_uri`, `main_class`, `python_script_file`, `sql_script_file`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] main_class - # @return [::String] - # The name of the driver's main class. The jar file that contains the - # class must be in the default CLASSPATH or specified in - # `jar_file_uris`. - # The execution args are passed in as a sequence of named process - # arguments (`--key=value`). - # - # Note: The following fields are mutually exclusive: `main_class`, `main_jar_file_uri`, `python_script_file`, `sql_script_file`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] python_script_file - # @return [::String] - # The Gcloud Storage URI of the main Python file to use as the driver. - # Must be a .py file. The execution args are passed in as a sequence of - # named process arguments (`--key=value`). - # - # Note: The following fields are mutually exclusive: `python_script_file`, `main_jar_file_uri`, `main_class`, `sql_script_file`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sql_script_file - # @return [::String] - # A reference to a query file. This should be the Cloud Storage URI of - # the query file. The execution args are used to declare a set of script - # variables (`set key="value";`). - # - # Note: The following fields are mutually exclusive: `sql_script_file`, `main_jar_file_uri`, `main_class`, `python_script_file`, `sql_script`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sql_script - # @return [::String] - # The query text. - # The execution args are used to declare a set of script variables - # (`set key="value";`). - # - # Note: The following fields are mutually exclusive: `sql_script`, `main_jar_file_uri`, `main_class`, `python_script_file`, `sql_script_file`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] file_uris - # @return [::Array<::String>] - # Optional. Cloud Storage URIs of files to be placed in the working - # directory of each executor. - # @!attribute [rw] archive_uris - # @return [::Array<::String>] - # Optional. Cloud Storage URIs of archives to be extracted into the working - # directory of each executor. Supported file types: .jar, .tar, .tar.gz, - # .tgz, and .zip. - # @!attribute [rw] infrastructure_spec - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] - # Optional. Infrastructure specification for the execution. - class SparkTaskConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config for running scheduled notebooks. - # @!attribute [rw] notebook - # @return [::String] - # Required. Path to input notebook. This can be the Cloud Storage URI of - # the notebook file or the path to a Notebook Content. The execution args - # are accessible as environment variables - # (`TASK_key=value`). - # @!attribute [rw] infrastructure_spec - # @return [::Google::Cloud::Dataplex::V1::Task::InfrastructureSpec] - # Optional. Infrastructure specification for the execution. - # @!attribute [rw] file_uris - # @return [::Array<::String>] - # Optional. Cloud Storage URIs of files to be placed in the working - # directory of each executor. - # @!attribute [rw] archive_uris - # @return [::Array<::String>] - # Optional. Cloud Storage URIs of archives to be extracted into the working - # directory of each executor. Supported file types: .jar, .tar, .tar.gz, - # .tgz, and .zip. - class NotebookTaskConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of the task execution (e.g. Jobs). - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update time of the status. - # @!attribute [r] latest_job - # @return [::Google::Cloud::Dataplex::V1::Job] - # Output only. latest job execution - class ExecutionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A job represents an instance of a task. - # @!attribute [r] name - # @return [::String] - # Output only. The relative resource name of the job, of the form: - # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - # @!attribute [r] uid - # @return [::String] - # Output only. System generated globally unique ID for the job. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the job was started. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the job ended. - # @!attribute [r] state - # @return [::Google::Cloud::Dataplex::V1::Job::State] - # Output only. Execution state for the job. - # @!attribute [r] retry_count - # @return [::Integer] - # Output only. The number of times the job has been retried (excluding the - # initial attempt). - # @!attribute [r] service - # @return [::Google::Cloud::Dataplex::V1::Job::Service] - # Output only. The underlying service running a job. - # @!attribute [r] service_job - # @return [::String] - # Output only. The full resource name for the job run under a particular - # service. - # @!attribute [r] message - # @return [::String] - # Output only. Additional information about the current state. - # @!attribute [r] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. User-defined labels for the task. - # @!attribute [r] trigger - # @return [::Google::Cloud::Dataplex::V1::Job::Trigger] - # Output only. Job execution trigger. - # @!attribute [r] execution_spec - # @return [::Google::Cloud::Dataplex::V1::Task::ExecutionSpec] - # Output only. Spec related to how a task is executed. - class Job - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module Service - # Service used to run the job is unspecified. - SERVICE_UNSPECIFIED = 0 - - # Dataproc service is used to run this job. - DATAPROC = 1 - end - - module State - # The job state is unknown. - STATE_UNSPECIFIED = 0 - - # The job is running. - RUNNING = 1 - - # The job is cancelling. - CANCELLING = 2 - - # The job cancellation was successful. - CANCELLED = 3 - - # The job completed successfully. - SUCCEEDED = 4 - - # The job is no longer running due to an error. - FAILED = 5 - - # The job was cancelled outside of Dataplex Universal Catalog. - ABORTED = 6 - end - - # Job execution trigger. - module Trigger - # The trigger is unspecified. - TRIGGER_UNSPECIFIED = 0 - - # The job was triggered by Dataplex Universal Catalog based on trigger spec - # from task definition. - TASK_CONFIG = 1 - - # The job was triggered by the explicit call of Task API. - RUN_REQUEST = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# 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 Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::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. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# 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 Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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 Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile deleted file mode 100644 index 352befc96409..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# 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! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-dataplex-v1", path: "../" -else - gem "google-cloud-dataplex-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary.rb deleted file mode 100644 index 52cef3031028..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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_BusinessGlossaryService_CreateGlossary_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_glossary call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary. -# -def create_glossary - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new - - # Call the create_glossary method. - result = client.create_glossary request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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_BusinessGlossaryService_CreateGlossary_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_category.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_category.rb deleted file mode 100644 index 378860f5e326..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_category.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_BusinessGlossaryService_CreateGlossaryCategory_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_glossary_category call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_category. -# -def create_glossary_category - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new - - # Call the create_glossary_category method. - result = client.create_glossary_category request - - # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. - p result -end -# [END dataplex_v1_generated_BusinessGlossaryService_CreateGlossaryCategory_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_term.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_term.rb deleted file mode 100644 index d1275cf10a6f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/create_glossary_term.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_BusinessGlossaryService_CreateGlossaryTerm_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_glossary_term call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_term. -# -def create_glossary_term - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new - - # Call the create_glossary_term method. - result = client.create_glossary_term request - - # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. - p result -end -# [END dataplex_v1_generated_BusinessGlossaryService_CreateGlossaryTerm_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary.rb deleted file mode 100644 index 3fbdf3910b99..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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_BusinessGlossaryService_DeleteGlossary_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_glossary call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary. -# -def delete_glossary - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new - - # Call the delete_glossary method. - result = client.delete_glossary request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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_BusinessGlossaryService_DeleteGlossary_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_category.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_category.rb deleted file mode 100644 index 8e5f8124895d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_category.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_BusinessGlossaryService_DeleteGlossaryCategory_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_glossary_category call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_category. -# -def delete_glossary_category - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new - - # Call the delete_glossary_category method. - result = client.delete_glossary_category request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_BusinessGlossaryService_DeleteGlossaryCategory_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_term.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_term.rb deleted file mode 100644 index 17c5a723adc9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/delete_glossary_term.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_BusinessGlossaryService_DeleteGlossaryTerm_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_glossary_term call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_term. -# -def delete_glossary_term - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new - - # Call the delete_glossary_term method. - result = client.delete_glossary_term request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_BusinessGlossaryService_DeleteGlossaryTerm_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary.rb deleted file mode 100644 index a0e55d302ac3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_BusinessGlossaryService_GetGlossary_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_glossary call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary. -# -def get_glossary - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetGlossaryRequest.new - - # Call the get_glossary method. - result = client.get_glossary request - - # The returned object is of type Google::Cloud::Dataplex::V1::Glossary. - p result -end -# [END dataplex_v1_generated_BusinessGlossaryService_GetGlossary_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_category.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_category.rb deleted file mode 100644 index 1263e8de5308..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_category.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_BusinessGlossaryService_GetGlossaryCategory_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_glossary_category call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_category. -# -def get_glossary_category - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new - - # Call the get_glossary_category method. - result = client.get_glossary_category request - - # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. - p result -end -# [END dataplex_v1_generated_BusinessGlossaryService_GetGlossaryCategory_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_term.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_term.rb deleted file mode 100644 index 6d88f6034a5e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/get_glossary_term.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_BusinessGlossaryService_GetGlossaryTerm_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_glossary_term call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_term. -# -def get_glossary_term - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new - - # Call the get_glossary_term method. - result = client.get_glossary_term request - - # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. - p result -end -# [END dataplex_v1_generated_BusinessGlossaryService_GetGlossaryTerm_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossaries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossaries.rb deleted file mode 100644 index 3c77eb8cb2fa..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossaries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# 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_BusinessGlossaryService_ListGlossaries_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_glossaries call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossaries. -# -def list_glossaries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListGlossariesRequest.new - - # Call the list_glossaries method. - result = client.list_glossaries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Glossary. - p item - end -end -# [END dataplex_v1_generated_BusinessGlossaryService_ListGlossaries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_categories.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_categories.rb deleted file mode 100644 index d815c59983be..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_categories.rb +++ /dev/null @@ -1,51 +0,0 @@ -# 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_BusinessGlossaryService_ListGlossaryCategories_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_glossary_categories call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_categories. -# -def list_glossary_categories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.new - - # Call the list_glossary_categories method. - result = client.list_glossary_categories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryCategory. - p item - end -end -# [END dataplex_v1_generated_BusinessGlossaryService_ListGlossaryCategories_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_terms.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_terms.rb deleted file mode 100644 index a9d981c66eec..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/list_glossary_terms.rb +++ /dev/null @@ -1,51 +0,0 @@ -# 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_BusinessGlossaryService_ListGlossaryTerms_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_glossary_terms call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_terms. -# -def list_glossary_terms - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.new - - # Call the list_glossary_terms method. - result = client.list_glossary_terms request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryTerm. - p item - end -end -# [END dataplex_v1_generated_BusinessGlossaryService_ListGlossaryTerms_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary.rb deleted file mode 100644 index d6d328535e6c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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_BusinessGlossaryService_UpdateGlossary_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_glossary call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary. -# -def update_glossary - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new - - # Call the update_glossary method. - result = client.update_glossary request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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_BusinessGlossaryService_UpdateGlossary_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_category.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_category.rb deleted file mode 100644 index 42c4d375e8e1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_category.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_BusinessGlossaryService_UpdateGlossaryCategory_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_glossary_category call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_category. -# -def update_glossary_category - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new - - # Call the update_glossary_category method. - result = client.update_glossary_category request - - # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory. - p result -end -# [END dataplex_v1_generated_BusinessGlossaryService_UpdateGlossaryCategory_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_term.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_term.rb deleted file mode 100644 index ac8665a6408e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/business_glossary_service/update_glossary_term.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_BusinessGlossaryService_UpdateGlossaryTerm_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_glossary_term call in the BusinessGlossaryService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_term. -# -def update_glossary_term - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new - - # Call the update_glossary_term method. - result = client.update_glossary_term request - - # The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm. - p result -end -# [END dataplex_v1_generated_BusinessGlossaryService_UpdateGlossaryTerm_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/cancel_metadata_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/cancel_metadata_job.rb deleted file mode 100644 index f598643739d3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/cancel_metadata_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_CatalogService_CancelMetadataJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the cancel_metadata_job call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#cancel_metadata_job. -# -def cancel_metadata_job - # 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::CancelMetadataJobRequest.new - - # Call the cancel_metadata_job method. - result = client.cancel_metadata_job request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_CatalogService_CancelMetadataJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb deleted file mode 100644 index d26197415d2e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_aspect_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_CreateAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type. -# -def create_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new - - # Call the create_aspect_type method. - result = client.create_aspect_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb deleted file mode 100644 index 86738c025fc1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_CreateEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry. -# -def create_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntryRequest.new - - # Call the create_entry method. - result = client.create_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_CreateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb deleted file mode 100644 index 9b0364319d39..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_group.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_CreateEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group. -# -def create_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new - - # Call the create_entry_group method. - result = client.create_entry_group request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_link.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_link.rb deleted file mode 100644 index b73e72b56e36..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_link.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_CatalogService_CreateEntryLink_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_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: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_link. -# -def create_entry_link - # 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::CreateEntryLinkRequest.new - - # Call the create_entry_link method. - result = client.create_entry_link request - - # The returned object is of type Google::Cloud::Dataplex::V1::EntryLink. - p result -end -# [END dataplex_v1_generated_CatalogService_CreateEntryLink_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb deleted file mode 100644 index 2f6b96d86908..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_entry_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_CreateEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type. -# -def create_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new - - # Call the create_entry_type method. - result = client.create_entry_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_job.rb deleted file mode 100644 index bcad470a44e9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/create_metadata_job.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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_CatalogService_CreateMetadataJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_metadata_job call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_job. -# -def create_metadata_job - # 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::CreateMetadataJobRequest.new - - # Call the create_metadata_job method. - result = client.create_metadata_job request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_CreateMetadataJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb deleted file mode 100644 index d03c2739f9cd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_aspect_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_DeleteAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type. -# -def delete_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new - - # Call the delete_aspect_type method. - result = client.delete_aspect_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_DeleteAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb deleted file mode 100644 index ce2b97b65462..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_DeleteEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry. -# -def delete_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntryRequest.new - - # Call the delete_entry method. - result = client.delete_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_DeleteEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb deleted file mode 100644 index 469a6cb4cddd..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_group.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_DeleteEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group. -# -def delete_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new - - # Call the delete_entry_group method. - result = client.delete_entry_group request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_link.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_link.rb deleted file mode 100644 index e956dded8639..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_link.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_CatalogService_DeleteEntryLink_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_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: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_link. -# -def delete_entry_link - # 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 -end -# [END dataplex_v1_generated_CatalogService_DeleteEntryLink_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb deleted file mode 100644 index dafa54b5e7e1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/delete_entry_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_DeleteEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type. -# -def delete_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new - - # Call the delete_entry_type method. - result = client.delete_entry_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_DeleteEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb deleted file mode 100644 index 8e7cbaa382c3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_aspect_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_GetAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type. -# -def get_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new - - # Call the get_aspect_type method. - result = client.get_aspect_type request - - # The returned object is of type Google::Cloud::Dataplex::V1::AspectType. - p result -end -# [END dataplex_v1_generated_CatalogService_GetAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb deleted file mode 100644 index eb355b3e2143..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_GetEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry. -# -def get_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntryRequest.new - - # Call the get_entry method. - result = client.get_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_GetEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb deleted file mode 100644 index 7042f54d29b7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_GetEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group. -# -def get_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new - - # Call the get_entry_group method. - result = client.get_entry_group request - - # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup. - p result -end -# [END dataplex_v1_generated_CatalogService_GetEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_link.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_link.rb deleted file mode 100644 index 12833a20b84c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_link.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_CatalogService_GetEntryLink_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_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: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_link. -# -def get_entry_link - # 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 -end -# [END dataplex_v1_generated_CatalogService_GetEntryLink_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb deleted file mode 100644 index f6f24ffc01b1..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_entry_type.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_GetEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type. -# -def get_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new - - # Call the get_entry_type method. - result = client.get_entry_type request - - # The returned object is of type Google::Cloud::Dataplex::V1::EntryType. - p result -end -# [END dataplex_v1_generated_CatalogService_GetEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_job.rb deleted file mode 100644 index a8ada4f517ba..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/get_metadata_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_CatalogService_GetMetadataJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_metadata_job call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_job. -# -def get_metadata_job - # 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::GetMetadataJobRequest.new - - # Call the get_metadata_job method. - result = client.get_metadata_job request - - # The returned object is of type Google::Cloud::Dataplex::V1::MetadataJob. - p result -end -# [END dataplex_v1_generated_CatalogService_GetMetadataJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb deleted file mode 100644 index 3701540ea298..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_aspect_types.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_ListAspectTypes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_aspect_types call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types. -# -def list_aspect_types - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new - - # Call the list_aspect_types method. - result = client.list_aspect_types request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::AspectType. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListAspectTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb deleted file mode 100644 index e3cce7fa21cf..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_ListEntries_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entries call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries. -# -def list_entries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntriesRequest.new - - # Call the list_entries method. - result = client.list_entries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Entry. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb deleted file mode 100644 index 7556100e6fee..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_ListEntryGroups_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entry_groups call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups. -# -def list_entry_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new - - # Call the list_entry_groups method. - result = client.list_entry_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListEntryGroups_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb deleted file mode 100644 index 76e326428354..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_entry_types.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_ListEntryTypes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entry_types call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types. -# -def list_entry_types - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new - - # Call the list_entry_types method. - result = client.list_entry_types request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::EntryType. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListEntryTypes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_jobs.rb deleted file mode 100644 index 9db0af0c90ee..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/list_metadata_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# 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_CatalogService_ListMetadataJobs_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_metadata_jobs call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_jobs. -# -def list_metadata_jobs - # 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::ListMetadataJobsRequest.new - - # Call the list_metadata_jobs method. - result = client.list_metadata_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::MetadataJob. - p item - end -end -# [END dataplex_v1_generated_CatalogService_ListMetadataJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb deleted file mode 100644 index 9c2e74773f39..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/lookup_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_LookupEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the lookup_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry. -# -def lookup_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::LookupEntryRequest.new - - # Call the lookup_entry method. - result = client.lookup_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_LookupEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb deleted file mode 100644 index b11b45fe9050..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/search_entries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_SearchEntries_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the search_entries call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries. -# -def search_entries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::SearchEntriesRequest.new - - # Call the search_entries method. - result = client.search_entries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::SearchEntriesResult. - p item - end -end -# [END dataplex_v1_generated_CatalogService_SearchEntries_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb deleted file mode 100644 index 1be7311d6e0c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_aspect_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_UpdateAspectType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_aspect_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type. -# -def update_aspect_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new - - # Call the update_aspect_type method. - result = client.update_aspect_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_UpdateAspectType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb deleted file mode 100644 index 5e8d89331f5d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_UpdateEntry_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entry call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry. -# -def update_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntryRequest.new - - # Call the update_entry method. - result = client.update_entry request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entry. - p result -end -# [END dataplex_v1_generated_CatalogService_UpdateEntry_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb deleted file mode 100644 index 6b43d4391426..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_group.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_UpdateEntryGroup_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entry_group call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group. -# -def update_entry_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new - - # Call the update_entry_group method. - result = client.update_entry_group request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb deleted file mode 100644 index 5bcfe7cd9688..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/catalog_service/update_entry_type.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_CatalogService_UpdateEntryType_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entry_type call in the CatalogService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type. -# -def update_entry_type - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CatalogService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new - - # Call the update_entry_type method. - result = client.update_entry_type request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_CatalogService_UpdateEntryType_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/create_encryption_config.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/create_encryption_config.rb deleted file mode 100644 index 53e965a74e30..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/create_encryption_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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_CmekService_CreateEncryptionConfig_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_encryption_config call in the CmekService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CmekService::Client#create_encryption_config. -# -def create_encryption_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CmekService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new - - # Call the create_encryption_config method. - result = client.create_encryption_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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_CmekService_CreateEncryptionConfig_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/delete_encryption_config.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/delete_encryption_config.rb deleted file mode 100644 index fdaadf43df1a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/delete_encryption_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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_CmekService_DeleteEncryptionConfig_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_encryption_config call in the CmekService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CmekService::Client#delete_encryption_config. -# -def delete_encryption_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CmekService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new - - # Call the delete_encryption_config method. - result = client.delete_encryption_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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_CmekService_DeleteEncryptionConfig_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/get_encryption_config.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/get_encryption_config.rb deleted file mode 100644 index 17e02b5f32f4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/get_encryption_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# 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_CmekService_GetEncryptionConfig_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_encryption_config call in the CmekService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CmekService::Client#get_encryption_config. -# -def get_encryption_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CmekService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new - - # Call the get_encryption_config method. - result = client.get_encryption_config request - - # The returned object is of type Google::Cloud::Dataplex::V1::EncryptionConfig. - p result -end -# [END dataplex_v1_generated_CmekService_GetEncryptionConfig_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/list_encryption_configs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/list_encryption_configs.rb deleted file mode 100644 index 50361d77e002..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/list_encryption_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# 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_CmekService_ListEncryptionConfigs_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_encryption_configs call in the CmekService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CmekService::Client#list_encryption_configs. -# -def list_encryption_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CmekService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.new - - # Call the list_encryption_configs method. - result = client.list_encryption_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::EncryptionConfig. - p item - end -end -# [END dataplex_v1_generated_CmekService_ListEncryptionConfigs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/update_encryption_config.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/update_encryption_config.rb deleted file mode 100644 index 11420afa8d94..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/cmek_service/update_encryption_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# 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_CmekService_UpdateEncryptionConfig_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_encryption_config call in the CmekService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::CmekService::Client#update_encryption_config. -# -def update_encryption_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::CmekService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new - - # Call the update_encryption_config method. - result = client.update_encryption_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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_CmekService_UpdateEncryptionConfig_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb deleted file mode 100644 index f2abf8640242..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/create_data_scan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataScanService_CreateDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan. -# -def create_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new - - # Call the create_data_scan method. - result = client.create_data_scan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataScanService_CreateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb deleted file mode 100644 index abffedf517dc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/delete_data_scan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataScanService_DeleteDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan. -# -def delete_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new - - # Call the delete_data_scan method. - result = client.delete_data_scan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataScanService_DeleteDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb deleted file mode 100644 index 25e98516ceee..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/generate_data_quality_rules.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataScanService_GenerateDataQualityRules_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the generate_data_quality_rules call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules. -# -def generate_data_quality_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new - - # Call the generate_data_quality_rules method. - result = client.generate_data_quality_rules request - - # The returned object is of type Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse. - p result -end -# [END dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb deleted file mode 100644 index b67886dd49e2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataScanService_GetDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan. -# -def get_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new - - # Call the get_data_scan method. - result = client.get_data_scan request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataScan. - p result -end -# [END dataplex_v1_generated_DataScanService_GetDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb deleted file mode 100644 index c533dcb32452..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/get_data_scan_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataScanService_GetDataScanJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_scan_job call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job. -# -def get_data_scan_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new - - # Call the get_data_scan_job method. - result = client.get_data_scan_job request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob. - p result -end -# [END dataplex_v1_generated_DataScanService_GetDataScanJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb deleted file mode 100644 index 8a12b7f8a9c3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scan_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataScanService_ListDataScanJobs_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_scan_jobs call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs. -# -def list_data_scan_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new - - # Call the list_data_scan_jobs method. - result = client.list_data_scan_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob. - p item - end -end -# [END dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb deleted file mode 100644 index 2a2f91ddf3f4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/list_data_scans.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataScanService_ListDataScans_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_scans call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans. -# -def list_data_scans - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new - - # Call the list_data_scans method. - result = client.list_data_scans request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan. - p item - end -end -# [END dataplex_v1_generated_DataScanService_ListDataScans_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb deleted file mode 100644 index 83f51308fff7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/run_data_scan.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataScanService_RunDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the run_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan. -# -def run_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new - - # Call the run_data_scan method. - result = client.run_data_scan request - - # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse. - p result -end -# [END dataplex_v1_generated_DataScanService_RunDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb deleted file mode 100644 index 57d0caf88a9b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_scan_service/update_data_scan.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataScanService_UpdateDataScan_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_scan call in the DataScanService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan. -# -def update_data_scan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataScanService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new - - # Call the update_data_scan method. - result = client.update_data_scan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataScanService_UpdateDataScan_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb deleted file mode 100644 index 343638fe0770..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_CreateDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute. -# -def create_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new - - # Call the create_data_attribute method. - result = client.create_data_attribute request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb deleted file mode 100644 index 7f0a63f9cfcf..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_attribute_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_CreateDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding. -# -def create_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new - - # Call the create_data_attribute_binding method. - result = client.create_data_attribute_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb deleted file mode 100644 index 7d60c45a3d29..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/create_data_taxonomy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_CreateDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy. -# -def create_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new - - # Call the create_data_taxonomy method. - result = client.create_data_taxonomy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb deleted file mode 100644 index 008961f379f8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_DeleteDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute. -# -def delete_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new - - # Call the delete_data_attribute method. - result = client.delete_data_attribute request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb deleted file mode 100644 index a94515914904..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_attribute_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_DeleteDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding. -# -def delete_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new - - # Call the delete_data_attribute_binding method. - result = client.delete_data_attribute_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb deleted file mode 100644 index 6080f761c2ae..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/delete_data_taxonomy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_DeleteDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy. -# -def delete_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new - - # Call the delete_data_taxonomy method. - result = client.delete_data_taxonomy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb deleted file mode 100644 index bc27c9c57240..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_GetDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute. -# -def get_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new - - # Call the get_data_attribute method. - result = client.get_data_attribute request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataAttribute. - p result -end -# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb deleted file mode 100644 index 7513d2e37465..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_attribute_binding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_GetDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding. -# -def get_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new - - # Call the get_data_attribute_binding method. - result = client.get_data_attribute_binding request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataAttributeBinding. - p result -end -# [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb deleted file mode 100644 index c9626bdedb08..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/get_data_taxonomy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_GetDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy. -# -def get_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new - - # Call the get_data_taxonomy method. - result = client.get_data_taxonomy request - - # The returned object is of type Google::Cloud::Dataplex::V1::DataTaxonomy. - p result -end -# [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb deleted file mode 100644 index d831b566da63..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attribute_bindings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_ListDataAttributeBindings_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings. -# -def list_data_attribute_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new - - # Call the list_data_attribute_bindings method. - result = client.list_data_attribute_bindings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttributeBinding. - p item - end -end -# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb deleted file mode 100644 index b502571bba95..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_attributes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_ListDataAttributes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_attributes call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes. -# -def list_data_attributes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new - - # Call the list_data_attributes method. - result = client.list_data_attributes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataAttribute. - p item - end -end -# [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb deleted file mode 100644 index cd6525ed9203..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/list_data_taxonomies.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_ListDataTaxonomies_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_data_taxonomies call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies. -# -def list_data_taxonomies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new - - # Call the list_data_taxonomies method. - result = client.list_data_taxonomies request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::DataTaxonomy. - p item - end -end -# [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb deleted file mode 100644 index 3c4cfd82e2ad..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_UpdateDataAttribute_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_attribute call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute. -# -def update_data_attribute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new - - # Call the update_data_attribute method. - result = client.update_data_attribute request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb deleted file mode 100644 index b2ded383f2d5..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_attribute_binding.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_UpdateDataAttributeBinding_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_attribute_binding call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding. -# -def update_data_attribute_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new - - # Call the update_data_attribute_binding method. - result = client.update_data_attribute_binding request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb deleted file mode 100644 index a5957abad25e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/data_taxonomy_service/update_data_taxonomy.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataTaxonomyService_UpdateDataTaxonomy_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_data_taxonomy call in the DataTaxonomyService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy. -# -def update_data_taxonomy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new - - # Call the update_data_taxonomy method. - result = client.update_data_taxonomy request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb deleted file mode 100644 index e270a5045cd9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/cancel_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_CancelJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the cancel_job call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job. -# -def cancel_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CancelJobRequest.new - - # Call the cancel_job method. - result = client.cancel_job request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_DataplexService_CancelJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb deleted file mode 100644 index e65b2cdaa34b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_CreateAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset. -# -def create_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new - - # Call the create_asset method. - result = client.create_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb deleted file mode 100644 index 5ca707d0e417..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_lake.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_CreateLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake. -# -def create_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new - - # Call the create_lake method. - result = client.create_lake request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb deleted file mode 100644 index cf0f4abe140c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_task.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_CreateTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_task. -# -def create_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new - - # Call the create_task method. - result = client.create_task request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb deleted file mode 100644 index a1fd9c9e5f70..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/create_zone.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_CreateZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone. -# -def create_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new - - # Call the create_zone method. - result = client.create_zone request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_CreateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb deleted file mode 100644 index bc945d9b4579..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_DeleteAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset. -# -def delete_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new - - # Call the delete_asset method. - result = client.delete_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb deleted file mode 100644 index 534220f2d987..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_lake.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_DeleteLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake. -# -def delete_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new - - # Call the delete_lake method. - result = client.delete_lake request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb deleted file mode 100644 index 674a315b309c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_task.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_DeleteTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task. -# -def delete_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new - - # Call the delete_task method. - result = client.delete_task request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb deleted file mode 100644 index 9a1f6aa2e916..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/delete_zone.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_DeleteZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone. -# -def delete_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new - - # Call the delete_zone method. - result = client.delete_zone request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_DeleteZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb deleted file mode 100644 index ba0a52f5a894..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_asset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_GetAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset. -# -def get_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetAssetRequest.new - - # Call the get_asset method. - result = client.get_asset request - - # The returned object is of type Google::Cloud::Dataplex::V1::Asset. - p result -end -# [END dataplex_v1_generated_DataplexService_GetAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb deleted file mode 100644 index abc4248ee618..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_job.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_GetJob_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_job call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_job. -# -def get_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetJobRequest.new - - # Call the get_job method. - result = client.get_job request - - # The returned object is of type Google::Cloud::Dataplex::V1::Job. - p result -end -# [END dataplex_v1_generated_DataplexService_GetJob_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb deleted file mode 100644 index e477071d760e..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_lake.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_GetLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake. -# -def get_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetLakeRequest.new - - # Call the get_lake method. - result = client.get_lake request - - # The returned object is of type Google::Cloud::Dataplex::V1::Lake. - p result -end -# [END dataplex_v1_generated_DataplexService_GetLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb deleted file mode 100644 index bce1a55092a9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_GetTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_task. -# -def get_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetTaskRequest.new - - # Call the get_task method. - result = client.get_task request - - # The returned object is of type Google::Cloud::Dataplex::V1::Task. - p result -end -# [END dataplex_v1_generated_DataplexService_GetTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb deleted file mode 100644 index fadd7d088d6f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/get_zone.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_GetZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone. -# -def get_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetZoneRequest.new - - # Call the get_zone method. - result = client.get_zone request - - # The returned object is of type Google::Cloud::Dataplex::V1::Zone. - p result -end -# [END dataplex_v1_generated_DataplexService_GetZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb deleted file mode 100644 index 9f0196205d62..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_asset_actions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_ListAssetActions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_asset_actions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions. -# -def list_asset_actions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new - - # Call the list_asset_actions method. - result = client.list_asset_actions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListAssetActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb deleted file mode 100644 index d49ded2de815..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_ListAssets_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_assets call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets. -# -def list_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new - - # Call the list_assets method. - result = client.list_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Asset. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb deleted file mode 100644 index 5fb95b9ba318..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_jobs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_ListJobs_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_jobs call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs. -# -def list_jobs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListJobsRequest.new - - # Call the list_jobs method. - result = client.list_jobs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Job. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListJobs_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb deleted file mode 100644 index 1a3929afabb6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lake_actions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_ListLakeActions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_lake_actions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions. -# -def list_lake_actions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new - - # Call the list_lake_actions method. - result = client.list_lake_actions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListLakeActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb deleted file mode 100644 index 90977eae1169..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_lakes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_ListLakes_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_lakes call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes. -# -def list_lakes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListLakesRequest.new - - # Call the list_lakes method. - result = client.list_lakes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Lake. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListLakes_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb deleted file mode 100644 index 8e73e41e8f76..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_tasks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_ListTasks_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_tasks call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks. -# -def list_tasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListTasksRequest.new - - # Call the list_tasks method. - result = client.list_tasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Task. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListTasks_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb deleted file mode 100644 index 9d971270db62..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zone_actions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_ListZoneActions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_zone_actions call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions. -# -def list_zone_actions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new - - # Call the list_zone_actions method. - result = client.list_zone_actions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Action. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListZoneActions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb deleted file mode 100644 index 171a05db3b8b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/list_zones.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_ListZones_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_zones call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones. -# -def list_zones - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListZonesRequest.new - - # Call the list_zones method. - result = client.list_zones request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Zone. - p item - end -end -# [END dataplex_v1_generated_DataplexService_ListZones_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb deleted file mode 100644 index 049ab80e837c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/run_task.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_RunTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the run_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#run_task. -# -def run_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::RunTaskRequest.new - - # Call the run_task method. - result = client.run_task request - - # The returned object is of type Google::Cloud::Dataplex::V1::RunTaskResponse. - p result -end -# [END dataplex_v1_generated_DataplexService_RunTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb deleted file mode 100644 index 2e250e4ed801..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_asset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_UpdateAsset_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_asset call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset. -# -def update_asset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new - - # Call the update_asset method. - result = client.update_asset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateAsset_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb deleted file mode 100644 index 27aa817718de..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_lake.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_UpdateLake_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_lake call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake. -# -def update_lake - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new - - # Call the update_lake method. - result = client.update_lake request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateLake_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb deleted file mode 100644 index 70c6ca8366a6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_task.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_UpdateTask_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_task call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_task. -# -def update_task - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new - - # Call the update_task method. - result = client.update_task request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateTask_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb deleted file mode 100644 index 1884af85c355..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/dataplex_service/update_zone.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_DataplexService_UpdateZone_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_zone call in the DataplexService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone. -# -def update_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::DataplexService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new - - # Call the update_zone method. - result = client.update_zone request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END dataplex_v1_generated_DataplexService_UpdateZone_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb deleted file mode 100644 index 5db5eaca9f7b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_MetadataService_CreateEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity. -# -def create_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new - - # Call the create_entity method. - result = client.create_entity request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - p result -end -# [END dataplex_v1_generated_MetadataService_CreateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb deleted file mode 100644 index ed7fa6eb509d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/create_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_MetadataService_CreatePartition_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the create_partition call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition. -# -def create_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new - - # Call the create_partition method. - result = client.create_partition request - - # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - p result -end -# [END dataplex_v1_generated_MetadataService_CreatePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb deleted file mode 100644 index 5e58d0b207c9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_MetadataService_DeleteEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity. -# -def delete_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new - - # Call the delete_entity method. - result = client.delete_entity request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_MetadataService_DeleteEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb deleted file mode 100644 index d19d531ed65b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/delete_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_MetadataService_DeletePartition_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the delete_partition call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition. -# -def delete_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new - - # Call the delete_partition method. - result = client.delete_partition request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END dataplex_v1_generated_MetadataService_DeletePartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb deleted file mode 100644 index bca1e119be2c..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_MetadataService_GetEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity. -# -def get_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetEntityRequest.new - - # Call the get_entity method. - result = client.get_entity request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - p result -end -# [END dataplex_v1_generated_MetadataService_GetEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb deleted file mode 100644 index e15771a9b4eb..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/get_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_MetadataService_GetPartition_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the get_partition call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition. -# -def get_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new - - # Call the get_partition method. - result = client.get_partition request - - # The returned object is of type Google::Cloud::Dataplex::V1::Partition. - p result -end -# [END dataplex_v1_generated_MetadataService_GetPartition_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb deleted file mode 100644 index af8af99eba53..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_entities.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_MetadataService_ListEntities_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_entities call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities. -# -def list_entities - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new - - # Call the list_entities method. - result = client.list_entities request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Entity. - p item - end -end -# [END dataplex_v1_generated_MetadataService_ListEntities_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb deleted file mode 100644 index 3ba6349e822d..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/list_partitions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_MetadataService_ListPartitions_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the list_partitions call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions. -# -def list_partitions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new - - # Call the list_partitions method. - result = client.list_partitions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Dataplex::V1::Partition. - p item - end -end -# [END dataplex_v1_generated_MetadataService_ListPartitions_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb b/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb deleted file mode 100644 index 4a8cd114d289..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/metadata_service/update_entity.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 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_MetadataService_UpdateEntity_sync] -require "google/cloud/dataplex/v1" - -## -# Snippet for the update_entity call in the MetadataService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity. -# -def update_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Dataplex::V1::MetadataService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new - - # Call the update_entity method. - result = client.update_entity request - - # The returned object is of type Google::Cloud::Dataplex::V1::Entity. - p result -end -# [END dataplex_v1_generated_MetadataService_UpdateEntity_sync] diff --git a/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json b/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json deleted file mode 100644 index 1321a46680e7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/snippets/snippet_metadata_google.cloud.dataplex.v1.json +++ /dev/null @@ -1,5095 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-dataplex-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.dataplex.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateLake_sync", - "title": "Snippet for the create_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake.", - "file": "dataplex_service/create_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateLake_sync", - "title": "Snippet for the update_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake.", - "file": "dataplex_service/update_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteLake_sync", - "title": "Snippet for the delete_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake.", - "file": "dataplex_service/delete_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListLakes_sync", - "title": "Snippet for the list_lakes call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes.", - "file": "dataplex_service/list_lakes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lakes", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lakes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListLakesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListLakesResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListLakes", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakes", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetLake_sync", - "title": "Snippet for the get_lake call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake.", - "file": "dataplex_service/get_lake.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_lake", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_lake", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetLakeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Lake", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetLake", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetLake", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListLakeActions_sync", - "title": "Snippet for the list_lake_actions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions.", - "file": "dataplex_service/list_lake_actions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_lake_actions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_lake_actions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListLakeActionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListLakeActions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListLakeActions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateZone_sync", - "title": "Snippet for the create_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone.", - "file": "dataplex_service/create_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateZone_sync", - "title": "Snippet for the update_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone.", - "file": "dataplex_service/update_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteZone_sync", - "title": "Snippet for the delete_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone.", - "file": "dataplex_service/delete_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListZones_sync", - "title": "Snippet for the list_zones call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones.", - "file": "dataplex_service/list_zones.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_zones", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zones", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListZonesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListZonesResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListZones", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListZones", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetZone_sync", - "title": "Snippet for the get_zone call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone.", - "file": "dataplex_service/get_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_zone", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Zone", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetZone", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetZone", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListZoneActions_sync", - "title": "Snippet for the list_zone_actions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions.", - "file": "dataplex_service/list_zone_actions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_zone_actions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_zone_actions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListZoneActionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListZoneActions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListZoneActions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateAsset_sync", - "title": "Snippet for the create_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset.", - "file": "dataplex_service/create_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateAsset_sync", - "title": "Snippet for the update_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset.", - "file": "dataplex_service/update_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteAsset_sync", - "title": "Snippet for the delete_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset.", - "file": "dataplex_service/delete_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListAssets_sync", - "title": "Snippet for the list_assets call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets.", - "file": "dataplex_service/list_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assets", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListAssetsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListAssets", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssets", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetAsset_sync", - "title": "Snippet for the get_asset call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset.", - "file": "dataplex_service/get_asset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Asset", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetAsset", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetAsset", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListAssetActions_sync", - "title": "Snippet for the list_asset_actions call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions.", - "file": "dataplex_service/list_asset_actions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_asset_actions", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_asset_actions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListAssetActionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListActionsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListAssetActions", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListAssetActions", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CreateTask_sync", - "title": "Snippet for the create_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#create_task.", - "file": "dataplex_service/create_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#create_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CreateTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.CreateTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_UpdateTask_sync", - "title": "Snippet for the update_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#update_task.", - "file": "dataplex_service/update_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#update_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "UpdateTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.UpdateTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_DeleteTask_sync", - "title": "Snippet for the delete_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task.", - "file": "dataplex_service/delete_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#delete_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "DeleteTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.DeleteTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListTasks_sync", - "title": "Snippet for the list_tasks call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks.", - "file": "dataplex_service/list_tasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_tasks", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_tasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListTasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListTasksResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListTasks", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListTasks", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetTask_sync", - "title": "Snippet for the get_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_task.", - "file": "dataplex_service/get_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Task", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_ListJobs_sync", - "title": "Snippet for the list_jobs call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs.", - "file": "dataplex_service/list_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_jobs", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#list_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListJobsResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "ListJobs", - "full_name": "google.cloud.dataplex.v1.DataplexService.ListJobs", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_RunTask_sync", - "title": "Snippet for the run_task call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#run_task.", - "file": "dataplex_service/run_task.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_task", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#run_task", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::RunTaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::RunTaskResponse", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "RunTask", - "full_name": "google.cloud.dataplex.v1.DataplexService.RunTask", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_GetJob_sync", - "title": "Snippet for the get_job call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#get_job.", - "file": "dataplex_service/get_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_job", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#get_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Job", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "GetJob", - "full_name": "google.cloud.dataplex.v1.DataplexService.GetJob", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataplexService_CancelJob_sync", - "title": "Snippet for the cancel_job call in the DataplexService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job.", - "file": "dataplex_service/cancel_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_job", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client#cancel_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CancelJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataplexService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataplexService::Client" - }, - "method": { - "short_name": "CancelJob", - "full_name": "google.cloud.dataplex.v1.DataplexService.CancelJob", - "service": { - "short_name": "DataplexService", - "full_name": "google.cloud.dataplex.v1.DataplexService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_CreateGlossary_sync", - "title": "Snippet for the create_glossary call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary.", - "file": "business_glossary_service/create_glossary.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_glossary", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateGlossaryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "CreateGlossary", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.CreateGlossary", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_UpdateGlossary_sync", - "title": "Snippet for the update_glossary call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary.", - "file": "business_glossary_service/update_glossary.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_glossary", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "UpdateGlossary", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.UpdateGlossary", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_DeleteGlossary_sync", - "title": "Snippet for the delete_glossary call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary.", - "file": "business_glossary_service/delete_glossary.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_glossary", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "DeleteGlossary", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.DeleteGlossary", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_GetGlossary_sync", - "title": "Snippet for the get_glossary call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary.", - "file": "business_glossary_service/get_glossary.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_glossary", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetGlossaryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Glossary", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "GetGlossary", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.GetGlossary", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_ListGlossaries_sync", - "title": "Snippet for the list_glossaries call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossaries.", - "file": "business_glossary_service/list_glossaries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_glossaries", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossaries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListGlossariesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListGlossariesResponse", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "ListGlossaries", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.ListGlossaries", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_CreateGlossaryCategory_sync", - "title": "Snippet for the create_glossary_category call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_category.", - "file": "business_glossary_service/create_glossary_category.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_glossary_category", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_category", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::GlossaryCategory", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "CreateGlossaryCategory", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.CreateGlossaryCategory", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_UpdateGlossaryCategory_sync", - "title": "Snippet for the update_glossary_category call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_category.", - "file": "business_glossary_service/update_glossary_category.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_glossary_category", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_category", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::GlossaryCategory", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "UpdateGlossaryCategory", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.UpdateGlossaryCategory", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_DeleteGlossaryCategory_sync", - "title": "Snippet for the delete_glossary_category call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_category.", - "file": "business_glossary_service/delete_glossary_category.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_glossary_category", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_category", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "DeleteGlossaryCategory", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.DeleteGlossaryCategory", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_GetGlossaryCategory_sync", - "title": "Snippet for the get_glossary_category call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_category.", - "file": "business_glossary_service/get_glossary_category.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_glossary_category", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_category", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::GlossaryCategory", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "GetGlossaryCategory", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.GetGlossaryCategory", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_ListGlossaryCategories_sync", - "title": "Snippet for the list_glossary_categories call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_categories.", - "file": "business_glossary_service/list_glossary_categories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_glossary_categories", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_categories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "ListGlossaryCategories", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.ListGlossaryCategories", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_CreateGlossaryTerm_sync", - "title": "Snippet for the create_glossary_term call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_term.", - "file": "business_glossary_service/create_glossary_term.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_glossary_term", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary_term", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::GlossaryTerm", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "CreateGlossaryTerm", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.CreateGlossaryTerm", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_UpdateGlossaryTerm_sync", - "title": "Snippet for the update_glossary_term call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_term.", - "file": "business_glossary_service/update_glossary_term.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_glossary_term", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#update_glossary_term", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::GlossaryTerm", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "UpdateGlossaryTerm", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.UpdateGlossaryTerm", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_DeleteGlossaryTerm_sync", - "title": "Snippet for the delete_glossary_term call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_term.", - "file": "business_glossary_service/delete_glossary_term.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_glossary_term", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary_term", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "DeleteGlossaryTerm", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.DeleteGlossaryTerm", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_GetGlossaryTerm_sync", - "title": "Snippet for the get_glossary_term call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_term.", - "file": "business_glossary_service/get_glossary_term.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_glossary_term", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#get_glossary_term", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::GlossaryTerm", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "GetGlossaryTerm", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.GetGlossaryTerm", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_BusinessGlossaryService_ListGlossaryTerms_sync", - "title": "Snippet for the list_glossary_terms call in the BusinessGlossaryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_terms.", - "file": "business_glossary_service/list_glossary_terms.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_glossary_terms", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossary_terms", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse", - "client": { - "short_name": "BusinessGlossaryService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client" - }, - "method": { - "short_name": "ListGlossaryTerms", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService.ListGlossaryTerms", - "service": { - "short_name": "BusinessGlossaryService", - "full_name": "google.cloud.dataplex.v1.BusinessGlossaryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryType_sync", - "title": "Snippet for the create_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type.", - "file": "catalog_service/create_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryType_sync", - "title": "Snippet for the update_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type.", - "file": "catalog_service/update_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryType_sync", - "title": "Snippet for the delete_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type.", - "file": "catalog_service/delete_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListEntryTypes_sync", - "title": "Snippet for the list_entry_types call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types.", - "file": "catalog_service/list_entry_types.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entry_types", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_types", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntryTypesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntryTypesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListEntryTypes", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryTypes", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetEntryType_sync", - "title": "Snippet for the get_entry_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type.", - "file": "catalog_service/get_entry_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::EntryType", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetEntryType", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateAspectType_sync", - "title": "Snippet for the create_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type.", - "file": "catalog_service/create_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateAspectType_sync", - "title": "Snippet for the update_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type.", - "file": "catalog_service/update_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteAspectType_sync", - "title": "Snippet for the delete_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type.", - "file": "catalog_service/delete_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListAspectTypes_sync", - "title": "Snippet for the list_aspect_types call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types.", - "file": "catalog_service/list_aspect_types.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_aspect_types", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_aspect_types", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListAspectTypesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListAspectTypesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListAspectTypes", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListAspectTypes", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetAspectType_sync", - "title": "Snippet for the get_aspect_type call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type.", - "file": "catalog_service/get_aspect_type.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_aspect_type", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_aspect_type", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetAspectTypeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::AspectType", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetAspectType", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetAspectType", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateEntryGroup_sync", - "title": "Snippet for the create_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group.", - "file": "catalog_service/create_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync", - "title": "Snippet for the update_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group.", - "file": "catalog_service/update_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync", - "title": "Snippet for the delete_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group.", - "file": "catalog_service/delete_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListEntryGroups_sync", - "title": "Snippet for the list_entry_groups call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups.", - "file": "catalog_service/list_entry_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entry_groups", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entry_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListEntryGroups", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntryGroups", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetEntryGroup_sync", - "title": "Snippet for the get_entry_group call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group.", - "file": "catalog_service/get_entry_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry_group", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::EntryGroup", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetEntryGroup", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryGroup", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateEntry_sync", - "title": "Snippet for the create_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry.", - "file": "catalog_service/create_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_UpdateEntry_sync", - "title": "Snippet for the update_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry.", - "file": "catalog_service/update_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#update_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "UpdateEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.UpdateEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_DeleteEntry_sync", - "title": "Snippet for the delete_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry.", - "file": "catalog_service/delete_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "DeleteEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_ListEntries_sync", - "title": "Snippet for the list_entries call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries.", - "file": "catalog_service/list_entries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entries", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_entries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntriesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListEntries", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListEntries", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_GetEntry_sync", - "title": "Snippet for the get_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry.", - "file": "catalog_service/get_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_LookupEntry_sync", - "title": "Snippet for the lookup_entry call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry.", - "file": "catalog_service/lookup_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_entry", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#lookup_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::LookupEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entry", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "LookupEntry", - "full_name": "google.cloud.dataplex.v1.CatalogService.LookupEntry", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_SearchEntries_sync", - "title": "Snippet for the search_entries call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries.", - "file": "catalog_service/search_entries.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_entries", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#search_entries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::SearchEntriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::SearchEntriesResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "SearchEntries", - "full_name": "google.cloud.dataplex.v1.CatalogService.SearchEntries", - "service": { - "short_name": "CatalogService", - "full_name": "google.cloud.dataplex.v1.CatalogService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CatalogService_CreateMetadataJob_sync", - "title": "Snippet for the create_metadata_job call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_job.", - "file": "catalog_service/create_metadata_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_metadata_job", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_metadata_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CreateMetadataJob", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateMetadataJob", - "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_GetMetadataJob_sync", - "title": "Snippet for the get_metadata_job call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_job.", - "file": "catalog_service/get_metadata_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_metadata_job", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_metadata_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetMetadataJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::MetadataJob", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "GetMetadataJob", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetMetadataJob", - "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_ListMetadataJobs_sync", - "title": "Snippet for the list_metadata_jobs call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_jobs.", - "file": "catalog_service/list_metadata_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_metadata_jobs", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#list_metadata_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "ListMetadataJobs", - "full_name": "google.cloud.dataplex.v1.CatalogService.ListMetadataJobs", - "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_CancelMetadataJob_sync", - "title": "Snippet for the cancel_metadata_job call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#cancel_metadata_job.", - "file": "catalog_service/cancel_metadata_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_metadata_job", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#cancel_metadata_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CatalogService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client" - }, - "method": { - "short_name": "CancelMetadataJob", - "full_name": "google.cloud.dataplex.v1.CatalogService.CancelMetadataJob", - "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_CreateEntryLink_sync", - "title": "Snippet for the create_entry_link call in the CatalogService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_link.", - "file": "catalog_service/create_entry_link.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entry_link", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#create_entry_link", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest", - "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": "CreateEntryLink", - "full_name": "google.cloud.dataplex.v1.CatalogService.CreateEntryLink", - "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_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", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_link.", - "file": "catalog_service/delete_entry_link.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entry_link", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#delete_entry_link", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest", - "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": "DeleteEntryLink", - "full_name": "google.cloud.dataplex.v1.CatalogService.DeleteEntryLink", - "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_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", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_link.", - "file": "catalog_service/get_entry_link.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entry_link", - "full_name": "::Google::Cloud::Dataplex::V1::CatalogService::Client#get_entry_link", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntryLinkRequest", - "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": "GetEntryLink", - "full_name": "google.cloud.dataplex.v1.CatalogService.GetEntryLink", - "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_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", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#create_encryption_config.", - "file": "cmek_service/create_encryption_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_encryption_config", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#create_encryption_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CmekService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" - }, - "method": { - "short_name": "CreateEncryptionConfig", - "full_name": "google.cloud.dataplex.v1.CmekService.CreateEncryptionConfig", - "service": { - "short_name": "CmekService", - "full_name": "google.cloud.dataplex.v1.CmekService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CmekService_UpdateEncryptionConfig_sync", - "title": "Snippet for the update_encryption_config call in the CmekService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#update_encryption_config.", - "file": "cmek_service/update_encryption_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_encryption_config", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#update_encryption_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CmekService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" - }, - "method": { - "short_name": "UpdateEncryptionConfig", - "full_name": "google.cloud.dataplex.v1.CmekService.UpdateEncryptionConfig", - "service": { - "short_name": "CmekService", - "full_name": "google.cloud.dataplex.v1.CmekService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CmekService_DeleteEncryptionConfig_sync", - "title": "Snippet for the delete_encryption_config call in the CmekService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#delete_encryption_config.", - "file": "cmek_service/delete_encryption_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_encryption_config", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#delete_encryption_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CmekService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" - }, - "method": { - "short_name": "DeleteEncryptionConfig", - "full_name": "google.cloud.dataplex.v1.CmekService.DeleteEncryptionConfig", - "service": { - "short_name": "CmekService", - "full_name": "google.cloud.dataplex.v1.CmekService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CmekService_ListEncryptionConfigs_sync", - "title": "Snippet for the list_encryption_configs call in the CmekService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#list_encryption_configs.", - "file": "cmek_service/list_encryption_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_encryption_configs", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#list_encryption_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse", - "client": { - "short_name": "CmekService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" - }, - "method": { - "short_name": "ListEncryptionConfigs", - "full_name": "google.cloud.dataplex.v1.CmekService.ListEncryptionConfigs", - "service": { - "short_name": "CmekService", - "full_name": "google.cloud.dataplex.v1.CmekService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_CmekService_GetEncryptionConfig_sync", - "title": "Snippet for the get_encryption_config call in the CmekService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::CmekService::Client#get_encryption_config.", - "file": "cmek_service/get_encryption_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_encryption_config", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client#get_encryption_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::EncryptionConfig", - "client": { - "short_name": "CmekService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::CmekService::Client" - }, - "method": { - "short_name": "GetEncryptionConfig", - "full_name": "google.cloud.dataplex.v1.CmekService.GetEncryptionConfig", - "service": { - "short_name": "CmekService", - "full_name": "google.cloud.dataplex.v1.CmekService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "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_data_product", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_product", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataProductService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" - }, - "method": { - "short_name": "CreateDataProduct", - "full_name": "google.cloud.dataplex.v1.DataProductService.CreateDataProduct", - "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_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": "delete_data_product", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#delete_data_product", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataProductService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" - }, - "method": { - "short_name": "DeleteDataProduct", - "full_name": "google.cloud.dataplex.v1.DataProductService.DeleteDataProduct", - "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_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": "get_data_product", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_product", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataProduct", - "client": { - "short_name": "DataProductService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" - }, - "method": { - "short_name": "GetDataProduct", - "full_name": "google.cloud.dataplex.v1.DataProductService.GetDataProduct", - "service": { - "short_name": "DataProductService", - "full_name": "google.cloud.dataplex.v1.DataProductService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "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": "list_data_products", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_products", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataProductsResponse", - "client": { - "short_name": "DataProductService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" - }, - "method": { - "short_name": "ListDataProducts", - "full_name": "google.cloud.dataplex.v1.DataProductService.ListDataProducts", - "service": { - "short_name": "DataProductService", - "full_name": "google.cloud.dataplex.v1.DataProductService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "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": "update_data_product", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#update_data_product", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataProductService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" - }, - "method": { - "short_name": "UpdateDataProduct", - "full_name": "google.cloud.dataplex.v1.DataProductService.UpdateDataProduct", - "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_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": "create_data_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#create_data_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataProductService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" - }, - "method": { - "short_name": "CreateDataAsset", - "full_name": "google.cloud.dataplex.v1.DataProductService.CreateDataAsset", - "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_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_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": "get_data_asset", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#get_data_asset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataAssetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataAsset", - "client": { - "short_name": "DataProductService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" - }, - "method": { - "short_name": "GetDataAsset", - "full_name": "google.cloud.dataplex.v1.DataProductService.GetDataAsset", - "service": { - "short_name": "DataProductService", - "full_name": "google.cloud.dataplex.v1.DataProductService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "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_data_assets", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client#list_data_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataAssetsResponse", - "client": { - "short_name": "DataProductService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataProductService::Client" - }, - "method": { - "short_name": "ListDataAssets", - "full_name": "google.cloud.dataplex.v1.DataProductService.ListDataAssets", - "service": { - "short_name": "DataProductService", - "full_name": "google.cloud.dataplex.v1.DataProductService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync", - "title": "Snippet for the create_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy.", - "file": "data_taxonomy_service/create_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "CreateDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync", - "title": "Snippet for the update_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy.", - "file": "data_taxonomy_service/update_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "UpdateDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync", - "title": "Snippet for the delete_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy.", - "file": "data_taxonomy_service/delete_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "DeleteDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync", - "title": "Snippet for the list_data_taxonomies call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies.", - "file": "data_taxonomy_service/list_data_taxonomies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_taxonomies", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_taxonomies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "ListDataTaxonomies", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataTaxonomies", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync", - "title": "Snippet for the get_data_taxonomy call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy.", - "file": "data_taxonomy_service/get_data_taxonomy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_taxonomy", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_taxonomy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataTaxonomy", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "GetDataTaxonomy", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataTaxonomy", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync", - "title": "Snippet for the create_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding.", - "file": "data_taxonomy_service/create_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "CreateDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync", - "title": "Snippet for the update_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding.", - "file": "data_taxonomy_service/update_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "UpdateDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync", - "title": "Snippet for the delete_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding.", - "file": "data_taxonomy_service/delete_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "DeleteDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync", - "title": "Snippet for the list_data_attribute_bindings call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings.", - "file": "data_taxonomy_service/list_data_attribute_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_attribute_bindings", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attribute_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "ListDataAttributeBindings", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributeBindings", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync", - "title": "Snippet for the get_data_attribute_binding call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding.", - "file": "data_taxonomy_service/get_data_attribute_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_attribute_binding", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataAttributeBinding", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "GetDataAttributeBinding", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttributeBinding", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync", - "title": "Snippet for the create_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute.", - "file": "data_taxonomy_service/create_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#create_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "CreateDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.CreateDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync", - "title": "Snippet for the update_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute.", - "file": "data_taxonomy_service/update_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#update_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "UpdateDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.UpdateDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync", - "title": "Snippet for the delete_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute.", - "file": "data_taxonomy_service/delete_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#delete_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "DeleteDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.DeleteDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync", - "title": "Snippet for the list_data_attributes call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes.", - "file": "data_taxonomy_service/list_data_attributes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_attributes", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#list_data_attributes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataAttributesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataAttributesResponse", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "ListDataAttributes", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.ListDataAttributes", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync", - "title": "Snippet for the get_data_attribute call in the DataTaxonomyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute.", - "file": "data_taxonomy_service/get_data_attribute.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_attribute", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client#get_data_attribute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataAttributeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataAttribute", - "client": { - "short_name": "DataTaxonomyService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client" - }, - "method": { - "short_name": "GetDataAttribute", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService.GetDataAttribute", - "service": { - "short_name": "DataTaxonomyService", - "full_name": "google.cloud.dataplex.v1.DataTaxonomyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_CreateDataScan_sync", - "title": "Snippet for the create_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan.", - "file": "data_scan_service/create_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#create_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "CreateDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_UpdateDataScan_sync", - "title": "Snippet for the update_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan.", - "file": "data_scan_service/update_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#update_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "UpdateDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_DeleteDataScan_sync", - "title": "Snippet for the delete_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan.", - "file": "data_scan_service/delete_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#delete_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "DeleteDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_GetDataScan_sync", - "title": "Snippet for the get_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan.", - "file": "data_scan_service/get_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataScan", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "GetDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_ListDataScans_sync", - "title": "Snippet for the list_data_scans call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans.", - "file": "data_scan_service/list_data_scans.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_scans", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scans", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataScansRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataScansResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "ListDataScans", - "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScans", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_RunDataScan_sync", - "title": "Snippet for the run_data_scan call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan.", - "file": "data_scan_service/run_data_scan.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_data_scan", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#run_data_scan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::RunDataScanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::RunDataScanResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "RunDataScan", - "full_name": "google.cloud.dataplex.v1.DataScanService.RunDataScan", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_GetDataScanJob_sync", - "title": "Snippet for the get_data_scan_job call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job.", - "file": "data_scan_service/get_data_scan_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_scan_job", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#get_data_scan_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetDataScanJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::DataScanJob", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "GetDataScanJob", - "full_name": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_ListDataScanJobs_sync", - "title": "Snippet for the list_data_scan_jobs call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs.", - "file": "data_scan_service/list_data_scan_jobs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_scan_jobs", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#list_data_scan_jobs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "ListDataScanJobs", - "full_name": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync", - "title": "Snippet for the generate_data_quality_rules call in the DataScanService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules.", - "file": "data_scan_service/generate_data_quality_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_data_quality_rules", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client#generate_data_quality_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse", - "client": { - "short_name": "DataScanService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::DataScanService::Client" - }, - "method": { - "short_name": "GenerateDataQualityRules", - "full_name": "google.cloud.dataplex.v1.DataScanService.GenerateDataQualityRules", - "service": { - "short_name": "DataScanService", - "full_name": "google.cloud.dataplex.v1.DataScanService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_CreateEntity_sync", - "title": "Snippet for the create_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity.", - "file": "metadata_service/create_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreateEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entity", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "CreateEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.CreateEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_UpdateEntity_sync", - "title": "Snippet for the update_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity.", - "file": "metadata_service/update_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#update_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::UpdateEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entity", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "UpdateEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.UpdateEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_DeleteEntity_sync", - "title": "Snippet for the delete_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity.", - "file": "metadata_service/delete_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeleteEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "DeleteEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.DeleteEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_GetEntity_sync", - "title": "Snippet for the get_entity call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity.", - "file": "metadata_service/get_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entity", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Entity", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "GetEntity", - "full_name": "google.cloud.dataplex.v1.MetadataService.GetEntity", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_ListEntities_sync", - "title": "Snippet for the list_entities call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities.", - "file": "metadata_service/list_entities.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entities", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_entities", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListEntitiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListEntitiesResponse", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "ListEntities", - "full_name": "google.cloud.dataplex.v1.MetadataService.ListEntities", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_CreatePartition_sync", - "title": "Snippet for the create_partition call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition.", - "file": "metadata_service/create_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_partition", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#create_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::CreatePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Partition", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "CreatePartition", - "full_name": "google.cloud.dataplex.v1.MetadataService.CreatePartition", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_DeletePartition_sync", - "title": "Snippet for the delete_partition call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition.", - "file": "metadata_service/delete_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_partition", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#delete_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::DeletePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "DeletePartition", - "full_name": "google.cloud.dataplex.v1.MetadataService.DeletePartition", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_GetPartition_sync", - "title": "Snippet for the get_partition call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition.", - "file": "metadata_service/get_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_partition", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#get_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::GetPartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::Partition", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "GetPartition", - "full_name": "google.cloud.dataplex.v1.MetadataService.GetPartition", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "dataplex_v1_generated_MetadataService_ListPartitions_sync", - "title": "Snippet for the list_partitions call in the MetadataService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions.", - "file": "metadata_service/list_partitions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_partitions", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client#list_partitions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Dataplex::V1::ListPartitionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Dataplex::V1::ListPartitionsResponse", - "client": { - "short_name": "MetadataService::Client", - "full_name": "::Google::Cloud::Dataplex::V1::MetadataService::Client" - }, - "method": { - "short_name": "ListPartitions", - "full_name": "google.cloud.dataplex.v1.MetadataService.ListPartitions", - "service": { - "short_name": "MetadataService", - "full_name": "google.cloud.dataplex.v1.MetadataService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_operations_test.rb deleted file mode 100644 index 841d4ff458a2..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# 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/business_glossary_pb" -require "google/cloud/dataplex/v1/business_glossary_services_pb" -require "google/cloud/dataplex/v1/business_glossary_service" - -class ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_paths_test.rb deleted file mode 100644 index ff635ded7712..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# 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/business_glossary_service" - -class ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_glossary_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::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.glossary_path project: "value0", location: "value1", glossary: "value2" - assert_equal "projects/value0/locations/value1/glossaries/value2", path - end - end - - def test_glossary_category_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::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.glossary_category_path project: "value0", location: "value1", glossary: "value2", glossary_category: "value3" - assert_equal "projects/value0/locations/value1/glossaries/value2/categories/value3", path - end - end - - def test_glossary_term_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::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.glossary_term_path project: "value0", location: "value1", glossary: "value2", glossary_term: "value3" - assert_equal "projects/value0/locations/value1/glossaries/value2/terms/value3", 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::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_rest_test.rb deleted file mode 100644 index b3ea495183e9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_rest_test.rb +++ /dev/null @@ -1,933 +0,0 @@ -# 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/business_glossary_pb" -require "google/cloud/dataplex/v1/business_glossary_service/rest" - - -class ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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_glossary - # 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" - glossary_id = "hello world" - glossary = {} - validate_only = true - - create_glossary_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_create_glossary_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_glossary_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_glossary({ parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_glossary parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_glossary ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new(parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_glossary({ parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_glossary(::Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new(parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_glossary_client_stub.call_count - end - end - end - - def test_update_glossary - # 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. - glossary = {} - update_mask = {} - validate_only = true - - update_glossary_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_update_glossary_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_glossary_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_glossary({ glossary: glossary, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_glossary glossary: glossary, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_glossary ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary({ glossary: glossary, 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_glossary(::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary_client_stub.call_count - end - end - end - - def test_delete_glossary - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_glossary_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_delete_glossary_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_glossary_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_glossary({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_glossary name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_glossary ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_glossary({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_glossary(::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_glossary_client_stub.call_count - end - end - end - - def test_get_glossary - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Glossary.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_glossary_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_get_glossary_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_glossary_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_glossary({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_glossary name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_glossary ::Google::Cloud::Dataplex::V1::GetGlossaryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_glossary({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_glossary(::Google::Cloud::Dataplex::V1::GetGlossaryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_glossary_client_stub.call_count - end - end - end - - def test_list_glossaries - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListGlossariesResponse.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_glossaries_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_list_glossaries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_glossaries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_glossaries({ 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_glossaries 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_glossaries ::Google::Cloud::Dataplex::V1::ListGlossariesRequest.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_glossaries({ 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_glossaries(::Google::Cloud::Dataplex::V1::ListGlossariesRequest.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_glossaries_client_stub.call_count - end - end - end - - def test_create_glossary_category - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - category_id = "hello world" - category = {} - - create_glossary_category_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_create_glossary_category_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_glossary_category_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_glossary_category({ parent: parent, category_id: category_id, category: category }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_glossary_category parent: parent, category_id: category_id, category: category do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_glossary_category ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new(parent: parent, category_id: category_id, category: category) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_glossary_category({ parent: parent, category_id: category_id, category: category }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_glossary_category(::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new(parent: parent, category_id: category_id, category: category), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_glossary_category_client_stub.call_count - end - end - end - - def test_update_glossary_category - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - category = {} - update_mask = {} - - update_glossary_category_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_update_glossary_category_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_glossary_category_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_glossary_category({ category: category, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_glossary_category category: category, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_glossary_category ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new(category: category, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_glossary_category({ category: category, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_glossary_category(::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new(category: category, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_glossary_category_client_stub.call_count - end - end - end - - def test_delete_glossary_category - # 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_glossary_category_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_delete_glossary_category_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_glossary_category_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_glossary_category({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_glossary_category name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_glossary_category ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_glossary_category({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_glossary_category(::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_glossary_category_client_stub.call_count - end - end - end - - def test_get_glossary_category - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_glossary_category_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_get_glossary_category_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_glossary_category_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_glossary_category({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_glossary_category name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_glossary_category ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_glossary_category({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_glossary_category(::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_glossary_category_client_stub.call_count - end - end - end - - def test_list_glossary_categories - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse.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_glossary_categories_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_list_glossary_categories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_glossary_categories_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_glossary_categories({ 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_glossary_categories 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_glossary_categories ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.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_glossary_categories({ 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_glossary_categories(::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.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_glossary_categories_client_stub.call_count - end - end - end - - def test_create_glossary_term - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - term_id = "hello world" - term = {} - - create_glossary_term_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_create_glossary_term_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_glossary_term_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_glossary_term({ parent: parent, term_id: term_id, term: term }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_glossary_term parent: parent, term_id: term_id, term: term do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_glossary_term ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new(parent: parent, term_id: term_id, term: term) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_glossary_term({ parent: parent, term_id: term_id, term: term }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_glossary_term(::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new(parent: parent, term_id: term_id, term: term), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_glossary_term_client_stub.call_count - end - end - end - - def test_update_glossary_term - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - term = {} - update_mask = {} - - update_glossary_term_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_update_glossary_term_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_glossary_term_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_glossary_term({ term: term, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_glossary_term term: term, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_glossary_term ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new(term: term, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_glossary_term({ term: term, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_glossary_term(::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new(term: term, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_glossary_term_client_stub.call_count - end - end - end - - def test_delete_glossary_term - # 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_glossary_term_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_delete_glossary_term_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_glossary_term_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_glossary_term({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_glossary_term name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_glossary_term ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_glossary_term({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_glossary_term(::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_glossary_term_client_stub.call_count - end - end - end - - def test_get_glossary_term - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_glossary_term_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_get_glossary_term_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_glossary_term_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_glossary_term({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_glossary_term name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_glossary_term ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_glossary_term({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_glossary_term(::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_glossary_term_client_stub.call_count - end - end - end - - def test_list_glossary_terms - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse.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_glossary_terms_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::BusinessGlossaryService::Rest::ServiceStub.stub :transcode_list_glossary_terms_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_glossary_terms_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_glossary_terms({ 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_glossary_terms 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_glossary_terms ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.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_glossary_terms({ 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_glossary_terms(::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.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_glossary_terms_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::BusinessGlossaryService::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::BusinessGlossaryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_test.rb deleted file mode 100644 index d8d745e39fc9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/business_glossary_service_test.rb +++ /dev/null @@ -1,1066 +0,0 @@ -# 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/business_glossary_pb" -require "google/cloud/dataplex/v1/business_glossary_service" - -class ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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_glossary - # 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" - glossary_id = "hello world" - glossary = {} - validate_only = true - - create_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_glossary, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["glossary_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Glossary), request["glossary"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_glossary_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_glossary({ parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_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_glossary parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_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_glossary ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new(parent: parent, glossary_id: glossary_id, glossary: glossary, validate_only: validate_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_glossary({ parent: parent, glossary_id: glossary_id, glossary: glossary, 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_glossary(::Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new(parent: parent, glossary_id: glossary_id, glossary: glossary, 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_glossary_client_stub.call_rpc_count - end - end - - def test_update_glossary - # 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. - glossary = {} - update_mask = {} - validate_only = true - - update_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_glossary, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Glossary), request["glossary"] - 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_glossary_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_glossary({ glossary: glossary, 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_glossary glossary: glossary, 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_glossary ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary({ glossary: glossary, 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_glossary(::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new(glossary: glossary, 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_glossary_client_stub.call_rpc_count - end - end - - def test_delete_glossary - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_glossary, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_glossary_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_glossary({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_glossary name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_glossary ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_glossary({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_glossary(::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_glossary_client_stub.call_rpc_count - end - end - - def test_get_glossary - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Glossary.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_glossary_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_glossary, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetGlossaryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_glossary_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_glossary({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_glossary name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_glossary ::Google::Cloud::Dataplex::V1::GetGlossaryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_glossary({ 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_glossary(::Google::Cloud::Dataplex::V1::GetGlossaryRequest.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_glossary_client_stub.call_rpc_count - end - end - - def test_list_glossaries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListGlossariesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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_glossaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_glossaries, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListGlossariesRequest, 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_glossaries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_glossaries({ 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_glossaries 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_glossaries ::Google::Cloud::Dataplex::V1::ListGlossariesRequest.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_glossaries({ 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_glossaries(::Google::Cloud::Dataplex::V1::ListGlossariesRequest.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_glossaries_client_stub.call_rpc_count - end - end - - def test_create_glossary_category - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new - grpc_operation = GRPC::ActiveCall::Operation.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" - category_id = "hello world" - category = {} - - create_glossary_category_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_glossary_category, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["category_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::GlossaryCategory), request["category"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_glossary_category_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_glossary_category({ parent: parent, category_id: category_id, category: category }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_glossary_category parent: parent, category_id: category_id, category: category do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_glossary_category ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new(parent: parent, category_id: category_id, category: category) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_glossary_category({ parent: parent, category_id: category_id, category: category }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_glossary_category(::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new(parent: parent, category_id: category_id, category: category), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_glossary_category_client_stub.call_rpc_count - end - end - - def test_update_glossary_category - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - category = {} - update_mask = {} - - update_glossary_category_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_glossary_category, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::GlossaryCategory), request["category"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_glossary_category_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_glossary_category({ category: category, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_glossary_category category: category, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_glossary_category ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new(category: category, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_glossary_category({ category: category, 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.update_glossary_category(::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new(category: category, 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, update_glossary_category_client_stub.call_rpc_count - end - end - - def test_delete_glossary_category - # 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_glossary_category_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_glossary_category, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_glossary_category_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_glossary_category({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_glossary_category name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_glossary_category ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_glossary_category({ 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_glossary_category(::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.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_glossary_category_client_stub.call_rpc_count - end - end - - def test_get_glossary_category - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryCategory.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_glossary_category_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_glossary_category, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_glossary_category_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_glossary_category({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_glossary_category name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_glossary_category ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_glossary_category({ 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_glossary_category(::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.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_glossary_category_client_stub.call_rpc_count - end - end - - def test_list_glossary_categories - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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_glossary_categories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_glossary_categories, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, 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_glossary_categories_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_glossary_categories({ 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_glossary_categories 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_glossary_categories ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.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_glossary_categories({ 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_glossary_categories(::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.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_glossary_categories_client_stub.call_rpc_count - end - end - - def test_create_glossary_term - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new - grpc_operation = GRPC::ActiveCall::Operation.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" - term_id = "hello world" - term = {} - - create_glossary_term_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_glossary_term, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["term_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::GlossaryTerm), request["term"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_glossary_term_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_glossary_term({ parent: parent, term_id: term_id, term: term }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_glossary_term parent: parent, term_id: term_id, term: term do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_glossary_term ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new(parent: parent, term_id: term_id, term: term) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_glossary_term({ parent: parent, term_id: term_id, term: term }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_glossary_term(::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new(parent: parent, term_id: term_id, term: term), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_glossary_term_client_stub.call_rpc_count - end - end - - def test_update_glossary_term - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - term = {} - update_mask = {} - - update_glossary_term_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_glossary_term, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::GlossaryTerm), request["term"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_glossary_term_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_glossary_term({ term: term, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_glossary_term term: term, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_glossary_term ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new(term: term, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_glossary_term({ term: term, 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.update_glossary_term(::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new(term: term, 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, update_glossary_term_client_stub.call_rpc_count - end - end - - def test_delete_glossary_term - # 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_glossary_term_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_glossary_term, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_glossary_term_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_glossary_term({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_glossary_term name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_glossary_term ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_glossary_term({ 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_glossary_term(::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.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_glossary_term_client_stub.call_rpc_count - end - end - - def test_get_glossary_term - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::GlossaryTerm.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_glossary_term_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_glossary_term, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_glossary_term_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_glossary_term({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_glossary_term name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_glossary_term ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_glossary_term({ 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_glossary_term(::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.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_glossary_term_client_stub.call_rpc_count - end - end - - def test_list_glossary_terms - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListGlossaryTermsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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_glossary_terms_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_glossary_terms, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, 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_glossary_terms_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_glossary_terms({ 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_glossary_terms 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_glossary_terms ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.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_glossary_terms({ 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_glossary_terms(::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.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_glossary_terms_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::BusinessGlossaryService::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::BusinessGlossaryService::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::BusinessGlossaryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::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::BusinessGlossaryService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb deleted file mode 100644 index dabe8edd2134..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# 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/catalog_pb" -require "google/cloud/dataplex/v1/catalog_services_pb" -require "google/cloud/dataplex/v1/catalog_service" - -class ::Google::Cloud::Dataplex::V1::CatalogService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - 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::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, 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::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb deleted file mode 100644 index 04c15003fadc..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_paths_test.rb +++ /dev/null @@ -1,163 +0,0 @@ -# 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/catalog_service" - -class ::Google::Cloud::Dataplex::V1::CatalogService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_aspect_type_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.aspect_type_path project: "value0", location: "value1", aspect_type: "value2" - assert_equal "projects/value0/locations/value1/aspectTypes/value2", path - end - end - - def test_entry_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_path project: "value0", location: "value1", entry_group: "value2", entry: "value3" - assert_equal "projects/value0/locations/value1/entryGroups/value2/entries/value3", path - end - end - - def test_entry_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_group_path project: "value0", location: "value1", entry_group: "value2" - assert_equal "projects/value0/locations/value1/entryGroups/value2", path - end - end - - def test_entry_link_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_link_path project: "value0", location: "value1", entry_group: "value2", entry_link: "value3" - assert_equal "projects/value0/locations/value1/entryGroups/value2/entryLinks/value3", path - end - end - - def test_entry_type_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entry_type_path project: "value0", location: "value1", entry_type: "value2" - assert_equal "projects/value0/locations/value1/entryTypes/value2", path - end - end - - def test_glossary_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.glossary_path project: "value0", location: "value1", glossary: "value2" - assert_equal "projects/value0/locations/value1/glossaries/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - 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 - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.metadata_job_path project: "value0", location: "value1", metadata_job: "value2" - assert_equal "projects/value0/locations/value1/metadataJobs/value2", path - end - end - - def test_project_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.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb deleted file mode 100644 index e3b7296a2ee4..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_rest_test.rb +++ /dev/null @@ -1,2176 +0,0 @@ -# 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/catalog_pb" -require "google/cloud/dataplex/v1/catalog_service/rest" - - -class ::Google::Cloud::Dataplex::V1::CatalogService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, 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_entry_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_type_id = "hello world" - entry_type = {} - validate_only = true - - create_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_type_client_stub.call_count - end - end - end - - def test_update_entry_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entry_type = {} - update_mask = {} - validate_only = true - - update_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entry_type_client_stub.call_count - end - end - end - - def test_delete_entry_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entry_type({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry_type name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry_type({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_type_client_stub.call_count - end - end - end - - def test_list_entry_types - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_types_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entry_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entry_types_client_stub.call_count - end - end - end - - def test_get_entry_type - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::EntryType.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entry_type({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry_type name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry_type({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_type_client_stub.call_count - end - end - end - - def test_create_aspect_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - aspect_type_id = "hello world" - aspect_type = {} - validate_only = true - - create_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_aspect_type_client_stub.call_count - end - end - end - - def test_update_aspect_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - aspect_type = {} - update_mask = {} - validate_only = true - - update_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_aspect_type_client_stub.call_count - end - end - end - - def test_delete_aspect_type - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_aspect_type({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_aspect_type name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_aspect_type({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_aspect_type_client_stub.call_count - end - end - end - - def test_list_aspect_types - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_aspect_types_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_types_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_aspect_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_aspect_types_client_stub.call_count - end - end - end - - def test_get_aspect_type - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::AspectType.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_aspect_type_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_aspect_type_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_aspect_type({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_aspect_type name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_aspect_type({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_aspect_type_client_stub.call_count - end - end - end - - def test_create_entry_group - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_group_id = "hello world" - entry_group = {} - validate_only = true - - create_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_group_client_stub.call_count - end - end - end - - def test_update_entry_group - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entry_group = {} - update_mask = {} - validate_only = true - - update_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entry_group_client_stub.call_count - end - end - end - - def test_delete_entry_group - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entry_group({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry_group name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry_group({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_group_client_stub.call_count - end - end - end - - def test_list_entry_groups - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entry_groups_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entry_groups_client_stub.call_count - end - end - end - - def test_get_entry_group - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::EntryGroup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entry_group({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry_group name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry_group({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_group_client_stub.call_count - end - end - end - - def test_create_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_id = "hello world" - entry = {} - - create_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry parent: parent, entry_id: entry_id, entry: entry do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_client_stub.call_count - end - end - end - - def test_update_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entry = {} - update_mask = {} - allow_missing = true - delete_missing_aspects = true - aspect_keys = ["hello world"] - - update_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entry_client_stub.call_count - end - end - end - - def test_delete_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entry({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_client_stub.call_count - end - end - end - - def test_list_entries - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entries_client_stub.call_count - end - end - end - - def test_get_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - - get_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_client_stub.call_count - end - end - end - - def test_lookup_entry - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - entry = "hello world" - - lookup_entry_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_entry_client_stub.call_count - end - end - end - - def test_search_entries - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - scope = "hello world" - semantic_search = true - - search_entries_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_search_entries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_entries_client_stub.call_count - end - end - end - - def test_create_metadata_job - # 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_job = {} - metadata_job_id = "hello world" - validate_only = true - - create_metadata_job_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_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_metadata_job_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_job({ parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_metadata_job parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_metadata_job ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest.new(parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_metadata_job({ parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job(::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest.new(parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job_client_stub.call_count - end - end - end - - def test_get_metadata_job - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::MetadataJob.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_metadata_job_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_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_metadata_job_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_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_metadata_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_metadata_job ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_metadata_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_metadata_job(::Google::Cloud::Dataplex::V1::GetMetadataJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_metadata_job_client_stub.call_count - end - end - end - - def test_list_metadata_jobs - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse.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_jobs_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_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_metadata_jobs_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_jobs({ 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_jobs 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_jobs ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest.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_jobs({ 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_jobs(::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest.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_jobs_client_stub.call_count - end - end - end - - def test_cancel_metadata_job - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_metadata_job_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_cancel_metadata_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_metadata_job_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.cancel_metadata_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_metadata_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_metadata_job ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_metadata_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_metadata_job(::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_metadata_job_client_stub.call_count - end - end - end - - def test_create_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. - parent = "hello world" - entry_link_id = "hello world" - entry_link = {} - - create_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_create_entry_link_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_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.create_entry_link({ parent: parent, entry_link_id: entry_link_id, entry_link: entry_link }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entry_link parent: parent, entry_link_id: entry_link_id, entry_link: entry_link do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entry_link ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest.new(parent: parent, entry_link_id: entry_link_id, entry_link: entry_link) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entry_link({ parent: parent, entry_link_id: entry_link_id, entry_link: entry_link }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entry_link(::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest.new(parent: parent, entry_link_id: entry_link_id, entry_link: entry_link), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entry_link_client_stub.call_count - end - 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 - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_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_delete_entry_link_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_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.delete_entry_link({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entry_link name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entry_link ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entry_link({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entry_link(::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entry_link_client_stub.call_count - end - 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 - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_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_get_entry_link_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_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.get_entry_link({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entry_link name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entry_link ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entry_link({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entry_link(::Google::Cloud::Dataplex::V1::GetEntryLinkRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entry_link_client_stub.call_count - end - 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 - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb deleted file mode 100644 index 27d68afdc9f3..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/catalog_service_test.rb +++ /dev/null @@ -1,2527 +0,0 @@ -# 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/catalog_pb" -require "google/cloud/dataplex/v1/catalog_service" - -class ::Google::Cloud::Dataplex::V1::CatalogService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - 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_entry_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_type_id = "hello world" - entry_type = {} - validate_only = true - - create_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_type_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry_type parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry_type ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry_type({ parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry_type(::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest.new(parent: parent, entry_type_id: entry_type_id, entry_type: entry_type, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_type_client_stub.call_rpc_count - end - end - - def test_update_entry_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entry_type = {} - update_mask = {} - validate_only = true - - update_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryType), request["entry_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entry_type entry_type: entry_type, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entry_type ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entry_type({ entry_type: entry_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entry_type(::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest.new(entry_type: entry_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entry_type_client_stub.call_rpc_count - end - end - - def test_delete_entry_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entry_type({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry_type name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry_type ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry_type({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry_type(::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_type_client_stub.call_rpc_count - end - end - - def test_list_entry_types - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entry_types, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entry_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entry_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entry_types ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entry_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entry_types(::Google::Cloud::Dataplex::V1::ListEntryTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entry_types_client_stub.call_rpc_count - end - end - - def test_get_entry_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::EntryType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entry_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entry_type({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry_type name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry_type ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry_type({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry_type(::Google::Cloud::Dataplex::V1::GetEntryTypeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_type_client_stub.call_rpc_count - end - end - - def test_create_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - aspect_type_id = "hello world" - aspect_type = {} - validate_only = true - - create_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["aspect_type_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_aspect_type parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_aspect_type ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_aspect_type({ parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_aspect_type(::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest.new(parent: parent, aspect_type_id: aspect_type_id, aspect_type: aspect_type, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_aspect_type_client_stub.call_rpc_count - end - end - - def test_update_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - aspect_type = {} - update_mask = {} - validate_only = true - - update_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::AspectType), request["aspect_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_aspect_type aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_aspect_type ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_aspect_type({ aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_aspect_type(::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest.new(aspect_type: aspect_type, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_aspect_type_client_stub.call_rpc_count - end - end - - def test_delete_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_aspect_type({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_aspect_type name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_aspect_type ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_aspect_type({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_aspect_type(::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_aspect_type_client_stub.call_rpc_count - end - end - - def test_list_aspect_types - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_aspect_types_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_aspect_types, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_aspect_types_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_aspect_types parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_aspect_types ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_aspect_types({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_aspect_types(::Google::Cloud::Dataplex::V1::ListAspectTypesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_aspect_types_client_stub.call_rpc_count - end - end - - def test_get_aspect_type - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::AspectType.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_aspect_type_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_aspect_type, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_aspect_type_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_aspect_type({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_aspect_type name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_aspect_type ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_aspect_type({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_aspect_type(::Google::Cloud::Dataplex::V1::GetAspectTypeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_aspect_type_client_stub.call_rpc_count - end - end - - def test_create_entry_group - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_group_id = "hello world" - entry_group = {} - validate_only = true - - create_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_group_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry_group parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry_group ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry_group({ parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry_group(::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest.new(parent: parent, entry_group_id: entry_group_id, entry_group: entry_group, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_group_client_stub.call_rpc_count - end - end - - def test_update_entry_group - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entry_group = {} - update_mask = {} - validate_only = true - - update_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryGroup), request["entry_group"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entry_group entry_group: entry_group, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entry_group ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entry_group({ entry_group: entry_group, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entry_group(::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest.new(entry_group: entry_group, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entry_group_client_stub.call_rpc_count - end - end - - def test_delete_entry_group - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entry_group({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry_group name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry_group ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry_group({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry_group(::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_group_client_stub.call_rpc_count - end - end - - def test_list_entry_groups - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_entry_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entry_groups, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entry_groups_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entry_groups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entry_groups ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entry_groups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entry_groups(::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entry_groups_client_stub.call_rpc_count - end - end - - def test_get_entry_group - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::EntryGroup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry_group, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entry_group_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entry_group({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry_group name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry_group ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry_group({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry_group(::Google::Cloud::Dataplex::V1::GetEntryGroupRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_group_client_stub.call_rpc_count - end - end - - def test_create_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entry_id = "hello world" - entry = {} - - create_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry parent: parent, entry_id: entry_id, entry: entry do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry ::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry({ parent: parent, entry_id: entry_id, entry: entry }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry(::Google::Cloud::Dataplex::V1::CreateEntryRequest.new(parent: parent, entry_id: entry_id, entry: entry), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_client_stub.call_rpc_count - end - end - - def test_update_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entry = {} - update_mask = {} - allow_missing = true - delete_missing_aspects = true - aspect_keys = ["hello world"] - - update_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entry), request["entry"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - assert_equal true, request["delete_missing_aspects"] - assert_equal ["hello world"], request["aspect_keys"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entry entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entry ::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entry({ entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entry(::Google::Cloud::Dataplex::V1::UpdateEntryRequest.new(entry: entry, update_mask: update_mask, allow_missing: allow_missing, delete_missing_aspects: delete_missing_aspects, aspect_keys: aspect_keys), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entry_client_stub.call_rpc_count - end - end - - def test_delete_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entry({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry ::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry(::Google::Cloud::Dataplex::V1::DeleteEntryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_client_stub.call_rpc_count - end - end - - def test_list_entries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entries, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entries ::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entries(::Google::Cloud::Dataplex::V1::ListEntriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entries_client_stub.call_rpc_count - end - end - - def test_get_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - - get_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryRequest, request - assert_equal "hello world", request["name"] - assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] - assert_equal ["hello world"], request["aspect_types"] - assert_equal ["hello world"], request["paths"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry name: name, view: view, aspect_types: aspect_types, paths: paths do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry ::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry(::Google::Cloud::Dataplex::V1::GetEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_client_stub.call_rpc_count - end - end - - def test_lookup_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTRY_VIEW_UNSPECIFIED - aspect_types = ["hello world"] - paths = ["hello world"] - entry = "hello world" - - lookup_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_entry, name - assert_kind_of ::Google::Cloud::Dataplex::V1::LookupEntryRequest, request - assert_equal "hello world", request["name"] - assert_equal :ENTRY_VIEW_UNSPECIFIED, request["view"] - assert_equal ["hello world"], request["aspect_types"] - assert_equal ["hello world"], request["paths"] - assert_equal "hello world", request["entry"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_entry_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.lookup_entry name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.lookup_entry ::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.lookup_entry({ name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.lookup_entry(::Google::Cloud::Dataplex::V1::LookupEntryRequest.new(name: name, view: view, aspect_types: aspect_types, paths: paths, entry: entry), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_entry_client_stub.call_rpc_count - end - end - - def test_search_entries - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::SearchEntriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - scope = "hello world" - semantic_search = true - - search_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_entries, name - assert_kind_of ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["scope"] - assert_equal true, request["semantic_search"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_entries_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_entries name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_entries ::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_entries({ name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_entries(::Google::Cloud::Dataplex::V1::SearchEntriesRequest.new(name: name, query: query, page_size: page_size, page_token: page_token, order_by: order_by, scope: scope, semantic_search: semantic_search), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_entries_client_stub.call_rpc_count - end - end - - def test_create_metadata_job - # 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_job = {} - metadata_job_id = "hello world" - validate_only = true - - create_metadata_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_metadata_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::MetadataJob), request["metadata_job"] - assert_equal "hello world", request["metadata_job_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_metadata_job_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_job({ parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest.new(parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job({ parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job(::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest.new(parent: parent, metadata_job: metadata_job, metadata_job_id: metadata_job_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_job_client_stub.call_rpc_count - end - end - - def test_get_metadata_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::MetadataJob.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_metadata_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_metadata_job_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_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_metadata_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_metadata_job ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest.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_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_metadata_job(::Google::Cloud::Dataplex::V1::GetMetadataJobRequest.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_job_client_stub.call_rpc_count - end - end - - def test_list_metadata_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_metadata_jobs, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, 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_jobs_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_jobs({ 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_jobs 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_jobs ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest.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_jobs({ 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_jobs(::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest.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_jobs_client_stub.call_rpc_count - end - end - - def test_cancel_metadata_job - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_metadata_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_metadata_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_metadata_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_metadata_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_metadata_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_metadata_job ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_metadata_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_metadata_job(::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest.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_metadata_job_client_stub.call_rpc_count - end - end - - def test_create_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. - parent = "hello world" - entry_link_id = "hello world" - entry_link = {} - - create_entry_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entry_link, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["entry_link_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EntryLink), request["entry_link"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_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.create_entry_link({ parent: parent, entry_link_id: entry_link_id, entry_link: entry_link }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entry_link parent: parent, entry_link_id: entry_link_id, entry_link: entry_link do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entry_link ::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest.new(parent: parent, entry_link_id: entry_link_id, entry_link: entry_link) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entry_link({ parent: parent, entry_link_id: entry_link_id, entry_link: entry_link }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entry_link(::Google::Cloud::Dataplex::V1::CreateEntryLinkRequest.new(parent: parent, entry_link_id: entry_link_id, entry_link: entry_link), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entry_link_client_stub.call_rpc_count - 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 - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_entry_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entry_link, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_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.delete_entry_link({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entry_link name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entry_link ::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entry_link({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entry_link(::Google::Cloud::Dataplex::V1::DeleteEntryLinkRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entry_link_client_stub.call_rpc_count - 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 - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entry_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entry_link, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_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.get_entry_link({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entry_link name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entry_link ::Google::Cloud::Dataplex::V1::GetEntryLinkRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entry_link({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entry_link(::Google::Cloud::Dataplex::V1::GetEntryLinkRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entry_link_client_stub.call_rpc_count - 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 - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Client::Configuration, config - end - - def test_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::CatalogService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::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::CatalogService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::CatalogService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_operations_test.rb deleted file mode 100644 index 5d8641c9aa46..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# 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/cmek_pb" -require "google/cloud/dataplex/v1/cmek_services_pb" -require "google/cloud/dataplex/v1/cmek_service" - -class ::Google::Cloud::Dataplex::V1::CmekService::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::CmekService::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::CmekService::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::CmekService::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::CmekService::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::CmekService::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::CmekService::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::CmekService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_paths_test.rb deleted file mode 100644 index 589bea6a44ab..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# 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/cmek_service" - -class ::Google::Cloud::Dataplex::V1::CmekService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_encryption_config_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::CmekService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.encryption_config_path organization: "value0", location: "value1", encryption_config: "value2" - assert_equal "organizations/value0/locations/value1/encryptionConfigs/value2", path - end - end - - def test_organization_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::CmekService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_rest_test.rb deleted file mode 100644 index c2df6816f348..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_rest_test.rb +++ /dev/null @@ -1,377 +0,0 @@ -# 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/cmek_pb" -require "google/cloud/dataplex/v1/cmek_service/rest" - - -class ::Google::Cloud::Dataplex::V1::CmekService::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_encryption_config - # 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" - encryption_config_id = "hello world" - encryption_config = {} - - create_encryption_config_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::CmekService::Rest::ServiceStub.stub :transcode_create_encryption_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_encryption_config_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_encryption_config({ parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_encryption_config parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_encryption_config ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new(parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_encryption_config({ parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_encryption_config(::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new(parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_encryption_config_client_stub.call_count - end - end - end - - def test_update_encryption_config - # 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. - encryption_config = {} - update_mask = {} - - update_encryption_config_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::CmekService::Rest::ServiceStub.stub :transcode_update_encryption_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_encryption_config_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_encryption_config({ encryption_config: encryption_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_encryption_config encryption_config: encryption_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_encryption_config ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new(encryption_config: encryption_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_encryption_config({ encryption_config: encryption_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_encryption_config(::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new(encryption_config: encryption_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_encryption_config_client_stub.call_count - end - end - end - - def test_delete_encryption_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_encryption_config_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::CmekService::Rest::ServiceStub.stub :transcode_delete_encryption_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_encryption_config_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_encryption_config({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_encryption_config name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_encryption_config ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_encryption_config({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_encryption_config(::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_encryption_config_client_stub.call_count - end - end - end - - def test_list_encryption_configs - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse.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_encryption_configs_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::CmekService::Rest::ServiceStub.stub :transcode_list_encryption_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_encryption_configs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_encryption_configs({ 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_encryption_configs 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_encryption_configs ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.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_encryption_configs({ 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_encryption_configs(::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.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_encryption_configs_client_stub.call_count - end - end - end - - def test_get_encryption_config - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::EncryptionConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_encryption_config_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::CmekService::Rest::ServiceStub.stub :transcode_get_encryption_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_encryption_config_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_encryption_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_encryption_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_encryption_config ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_encryption_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_encryption_config(::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_encryption_config_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::CmekService::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::CmekService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb deleted file mode 100644 index 33eabc1f527a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/cmek_service_test.rb +++ /dev/null @@ -1,444 +0,0 @@ -# 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/cmek_pb" -require "google/cloud/dataplex/v1/cmek_service" - -class ::Google::Cloud::Dataplex::V1::CmekService::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_encryption_config - # 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" - encryption_config_id = "hello world" - encryption_config = {} - - create_encryption_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_encryption_config, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["encryption_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EncryptionConfig), request["encryption_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_encryption_config_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_encryption_config({ parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config }) 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_encryption_config parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config do |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_encryption_config ::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new(parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config) 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_encryption_config({ parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config }, 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_encryption_config(::Google::Cloud::Dataplex::V1::CreateEncryptionConfigRequest.new(parent: parent, encryption_config_id: encryption_config_id, encryption_config: encryption_config), 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_encryption_config_client_stub.call_rpc_count - end - end - - def test_update_encryption_config - # 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. - encryption_config = {} - update_mask = {} - - update_encryption_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_encryption_config, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::EncryptionConfig), request["encryption_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_encryption_config_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_encryption_config({ encryption_config: encryption_config, update_mask: update_mask }) 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_encryption_config encryption_config: encryption_config, update_mask: update_mask do |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_encryption_config ::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new(encryption_config: encryption_config, update_mask: update_mask) 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_encryption_config({ encryption_config: encryption_config, update_mask: update_mask }, 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_encryption_config(::Google::Cloud::Dataplex::V1::UpdateEncryptionConfigRequest.new(encryption_config: encryption_config, update_mask: update_mask), 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_encryption_config_client_stub.call_rpc_count - end - end - - def test_delete_encryption_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_encryption_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_encryption_config, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_encryption_config_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_encryption_config({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_encryption_config name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_encryption_config ::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_encryption_config({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_encryption_config(::Google::Cloud::Dataplex::V1::DeleteEncryptionConfigRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_encryption_config_client_stub.call_rpc_count - end - end - - def test_list_encryption_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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_encryption_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_encryption_configs, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest, 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_encryption_configs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_encryption_configs({ 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_encryption_configs 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_encryption_configs ::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.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_encryption_configs({ 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_encryption_configs(::Google::Cloud::Dataplex::V1::ListEncryptionConfigsRequest.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_encryption_configs_client_stub.call_rpc_count - end - end - - def test_get_encryption_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::EncryptionConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_encryption_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_encryption_config, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_encryption_config_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::CmekService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_encryption_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_encryption_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_encryption_config ::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_encryption_config({ 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_encryption_config(::Google::Cloud::Dataplex::V1::GetEncryptionConfigRequest.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_encryption_config_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::CmekService::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::CmekService::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::CmekService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Dataplex::V1::CmekService::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::CmekService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::CmekService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb deleted file mode 100644 index adb187b5bcca..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/content_service_test.rb +++ /dev/null @@ -1,104 +0,0 @@ -# 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/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_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/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb deleted file mode 100644 index a3c160d4de51..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# 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/datascans_pb" -require "google/cloud/dataplex/v1/datascans_services_pb" -require "google/cloud/dataplex/v1/data_scan_service" - -class ::Google::Cloud::Dataplex::V1::DataScanService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - 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::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, 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::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb deleted file mode 100644 index 92a049f88e9a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_paths_test.rb +++ /dev/null @@ -1,127 +0,0 @@ -# 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_scan_service" - -class ::Google::Cloud::Dataplex::V1::DataScanService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_connection_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.connection_path project: "value0", location: "value1", connection: "value2" - assert_equal "projects/value0/locations/value1/connections/value2", path - end - end - - def test_data_scan_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_scan_path project: "value0", location: "value1", data_scan: "value2" - assert_equal "projects/value0/locations/value1/dataScans/value2", path - end - end - - def test_data_scan_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_scan_job_path project: "value0", location: "value1", data_scan: "value2", job: "value3" - assert_equal "projects/value0/locations/value1/dataScans/value2/jobs/value3", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", dataset: "value1" - assert_equal "projects/value0/datasets/value1", path - end - end - - def test_entity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb deleted file mode 100644 index b87cf83d9aa7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_rest_test.rb +++ /dev/null @@ -1,600 +0,0 @@ -# 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/datascans_pb" -require "google/cloud/dataplex/v1/data_scan_service/rest" - - -class ::Google::Cloud::Dataplex::V1::DataScanService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, 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_scan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_scan = {} - data_scan_id = "hello world" - validate_only = true - - create_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_create_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_scan_client_stub.call_count - end - end - end - - def test_update_data_scan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_scan = {} - update_mask = {} - validate_only = true - - update_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_update_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_scan_client_stub.call_count - end - end - end - - def test_delete_data_scan - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_data_scan_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::DataScanService::Rest::ServiceStub.stub :transcode_delete_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_scan({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_scan name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_scan({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_scan_client_stub.call_count - end - end - end - - def test_get_data_scan - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataScan.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_VIEW_UNSPECIFIED - - get_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_scan({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_scan name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_scan({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_scan_client_stub.call_count - end - end - end - - def test_list_data_scans - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_scans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scans_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_scans_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_scans_client_stub.call_count - end - end - end - - def test_run_data_scan - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - run_data_scan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_run_data_scan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_data_scan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_data_scan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_data_scan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_data_scan_client_stub.call_count - end - end - end - - def test_get_data_scan_job - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataScanJob.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED - - get_data_scan_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_get_data_scan_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_scan_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_scan_job({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_scan_job name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_scan_job({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_scan_job_client_stub.call_count - end - end - end - - def test_list_data_scan_jobs - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_scan_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_list_data_scan_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_scan_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_scan_jobs_client_stub.call_count - end - end - end - - def test_generate_data_quality_rules - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - generate_data_quality_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataScanService::Rest::ServiceStub.stub :transcode_generate_data_quality_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_data_quality_rules_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_data_quality_rules({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_data_quality_rules name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_data_quality_rules({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_data_quality_rules_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb deleted file mode 100644 index 680478d5094a..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_scan_service_test.rb +++ /dev/null @@ -1,695 +0,0 @@ -# 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/datascans_pb" -require "google/cloud/dataplex/v1/data_scan_service" - -class ::Google::Cloud::Dataplex::V1::DataScanService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - 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_scan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_scan = {} - data_scan_id = "hello world" - validate_only = true - - create_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataScanRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] - assert_equal "hello world", request["data_scan_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_scan parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_scan ::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_scan({ parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_scan(::Google::Cloud::Dataplex::V1::CreateDataScanRequest.new(parent: parent, data_scan: data_scan, data_scan_id: data_scan_id, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_scan_client_stub.call_rpc_count - end - end - - def test_update_data_scan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - data_scan = {} - update_mask = {} - validate_only = true - - update_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataScan), request["data_scan"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_scan data_scan: data_scan, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_scan ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_scan({ data_scan: data_scan, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_scan(::Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new(data_scan: data_scan, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_scan_client_stub.call_rpc_count - end - end - - def test_delete_data_scan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_scan({ name: name, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_scan name: name, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_scan ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_scan({ name: name, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_scan(::Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_scan_client_stub.call_rpc_count - end - end - - def test_get_data_scan - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataScan.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_VIEW_UNSPECIFIED - - get_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanRequest, request - assert_equal "hello world", request["name"] - assert_equal :DATA_SCAN_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_scan({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_scan name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_scan ::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_scan({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_scan(::Google::Cloud::Dataplex::V1::GetDataScanRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_scan_client_stub.call_rpc_count - end - end - - def test_list_data_scans - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScansResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_scans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_scans, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScansRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_scans_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_scans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_scans ::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_scans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_scans(::Google::Cloud::Dataplex::V1::ListDataScansRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_scans_client_stub.call_rpc_count - end - end - - def test_run_data_scan - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::RunDataScanResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - run_data_scan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_data_scan, name - assert_kind_of ::Google::Cloud::Dataplex::V1::RunDataScanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_data_scan_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_data_scan({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_data_scan name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_data_scan ::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_data_scan({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_data_scan(::Google::Cloud::Dataplex::V1::RunDataScanRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_data_scan_client_stub.call_rpc_count - end - end - - def test_get_data_scan_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataScanJob.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :DATA_SCAN_JOB_VIEW_UNSPECIFIED - - get_data_scan_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_scan_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, request - assert_equal "hello world", request["name"] - assert_equal :DATA_SCAN_JOB_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_scan_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_scan_job({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_scan_job name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_scan_job ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_scan_job({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_scan_job(::Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_scan_job_client_stub.call_rpc_count - end - end - - def test_list_data_scan_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataScanJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_scan_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_scan_jobs, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_scan_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_scan_jobs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_scan_jobs ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_scan_jobs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_scan_jobs(::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_scan_jobs_client_stub.call_rpc_count - end - end - - def test_generate_data_quality_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - generate_data_quality_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_data_quality_rules, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_data_quality_rules_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_data_quality_rules({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_data_quality_rules name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_data_quality_rules ::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_data_quality_rules({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_data_quality_rules(::Google::Cloud::Dataplex::V1::GenerateDataQualityRulesRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_data_quality_rules_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration, config - end - - def test_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::DataScanService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::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::DataScanService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::DataScanService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb deleted file mode 100644 index eeea60575eba..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# 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_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_services_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service" - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - 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::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, 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::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb deleted file mode 100644 index 227369dc3046..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# 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_taxonomy_service" - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_data_attribute_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_attribute_path project: "value0", location: "value1", data_taxonomy: "value2", data_attribute_id: "value3" - assert_equal "projects/value0/locations/value1/dataTaxonomies/value2/attributes/value3", path - end - end - - def test_data_attribute_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_attribute_binding_path project: "value0", location: "value1", data_attribute_binding_id: "value2" - assert_equal "projects/value0/locations/value1/dataAttributeBindings/value2", path - end - end - - def test_data_taxonomy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_taxonomy_path project: "value0", location: "value1", data_taxonomy_id: "value2" - assert_equal "projects/value0/locations/value1/dataTaxonomies/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb deleted file mode 100644 index c447e1de96d8..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_rest_test.rb +++ /dev/null @@ -1,939 +0,0 @@ -# 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_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service/rest" - - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, 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_taxonomy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_taxonomy_id = "hello world" - data_taxonomy = {} - validate_only = true - - create_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_taxonomy_client_stub.call_count - end - end - end - - def test_update_data_taxonomy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_taxonomy = {} - validate_only = true - - update_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_taxonomy_client_stub.call_count - end - end - end - - def test_delete_data_taxonomy - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_taxonomy({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_taxonomy name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_taxonomy({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_taxonomy_client_stub.call_count - end - end - end - - def test_list_data_taxonomies - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_taxonomies_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_taxonomies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_taxonomies_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_taxonomies_client_stub.call_count - end - end - end - - def test_get_data_taxonomy - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_taxonomy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_taxonomy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_taxonomy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_taxonomy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_taxonomy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_taxonomy_client_stub.call_count - end - end - end - - def test_create_data_attribute_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_binding_id = "hello world" - data_attribute_binding = {} - validate_only = true - - create_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_attribute_binding_client_stub.call_count - end - end - end - - def test_update_data_attribute_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute_binding = {} - validate_only = true - - update_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_attribute_binding_client_stub.call_count - end - end - end - - def test_delete_data_attribute_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_attribute_binding({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_attribute_binding name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_attribute_binding({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_attribute_binding_client_stub.call_count - end - end - end - - def test_list_data_attribute_bindings - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attribute_bindings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attribute_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_attribute_bindings_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_attribute_bindings_client_stub.call_count - end - end - end - - def test_get_data_attribute_binding - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_binding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_attribute_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_attribute_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_attribute_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_attribute_binding_client_stub.call_count - end - end - end - - def test_create_data_attribute - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_id = "hello world" - data_attribute = {} - validate_only = true - - create_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_create_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_attribute_client_stub.call_count - end - end - end - - def test_update_data_attribute - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute = {} - validate_only = true - - update_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_update_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_attribute_client_stub.call_count - end - end - end - - def test_delete_data_attribute - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_delete_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_attribute({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_attribute name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_attribute({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_attribute_client_stub.call_count - end - end - end - - def test_list_data_attributes - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attributes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_list_data_attributes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_attributes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_attributes_client_stub.call_count - end - end - end - - def test_get_data_attribute - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::DataAttribute.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::DataTaxonomyService::Rest::ServiceStub.stub :transcode_get_data_attribute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_attribute({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_attribute name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_attribute({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_attribute_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb deleted file mode 100644 index 9550f8cd2b8f..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/data_taxonomy_service_test.rb +++ /dev/null @@ -1,1108 +0,0 @@ -# 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_taxonomy_pb" -require "google/cloud/dataplex/v1/data_taxonomy_service" - -class ::Google::Cloud::Dataplex::V1::DataTaxonomyService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - 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_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_taxonomy_id = "hello world" - data_taxonomy = {} - validate_only = true - - create_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_taxonomy_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_taxonomy parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_taxonomy ::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_taxonomy({ parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_taxonomy(::Google::Cloud::Dataplex::V1::CreateDataTaxonomyRequest.new(parent: parent, data_taxonomy_id: data_taxonomy_id, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_update_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_taxonomy = {} - validate_only = true - - update_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataTaxonomy), request["data_taxonomy"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_taxonomy update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_taxonomy ::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_taxonomy({ update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_taxonomy(::Google::Cloud::Dataplex::V1::UpdateDataTaxonomyRequest.new(update_mask: update_mask, data_taxonomy: data_taxonomy, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_delete_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_taxonomy({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_taxonomy name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_taxonomy ::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_taxonomy({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_taxonomy(::Google::Cloud::Dataplex::V1::DeleteDataTaxonomyRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_list_data_taxonomies - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_taxonomies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_taxonomies, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_taxonomies_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_taxonomies parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_taxonomies ::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_taxonomies({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_taxonomies(::Google::Cloud::Dataplex::V1::ListDataTaxonomiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_taxonomies_client_stub.call_rpc_count - end - end - - def test_get_data_taxonomy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataTaxonomy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_taxonomy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_taxonomy, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_taxonomy_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_taxonomy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_taxonomy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_taxonomy ::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_taxonomy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_taxonomy(::Google::Cloud::Dataplex::V1::GetDataTaxonomyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_taxonomy_client_stub.call_rpc_count - end - end - - def test_create_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_binding_id = "hello world" - data_attribute_binding = {} - validate_only = true - - create_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_attribute_binding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_attribute_binding parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_attribute_binding ::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_attribute_binding({ parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_attribute_binding(::Google::Cloud::Dataplex::V1::CreateDataAttributeBindingRequest.new(parent: parent, data_attribute_binding_id: data_attribute_binding_id, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_update_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute_binding = {} - validate_only = true - - update_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttributeBinding), request["data_attribute_binding"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_attribute_binding update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_attribute_binding ::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_attribute_binding({ update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_attribute_binding(::Google::Cloud::Dataplex::V1::UpdateDataAttributeBindingRequest.new(update_mask: update_mask, data_attribute_binding: data_attribute_binding, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_delete_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_attribute_binding({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_attribute_binding name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_attribute_binding ::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_attribute_binding({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_attribute_binding(::Google::Cloud::Dataplex::V1::DeleteDataAttributeBindingRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_list_data_attribute_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attribute_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_attribute_bindings, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_attribute_bindings_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_attribute_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_attribute_bindings ::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_attribute_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_attribute_bindings(::Google::Cloud::Dataplex::V1::ListDataAttributeBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_attribute_bindings_client_stub.call_rpc_count - end - end - - def test_get_data_attribute_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataAttributeBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_attribute_binding, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_attribute_binding_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_attribute_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_attribute_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_attribute_binding ::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_attribute_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_attribute_binding(::Google::Cloud::Dataplex::V1::GetDataAttributeBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_attribute_binding_client_stub.call_rpc_count - end - end - - def test_create_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_attribute_id = "hello world" - data_attribute = {} - validate_only = true - - create_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_attribute_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_attribute parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_attribute ::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_attribute({ parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_attribute(::Google::Cloud::Dataplex::V1::CreateDataAttributeRequest.new(parent: parent, data_attribute_id: data_attribute_id, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_attribute_client_stub.call_rpc_count - end - end - - def test_update_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_attribute = {} - validate_only = true - - update_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::DataAttribute), request["data_attribute"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_attribute update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_attribute ::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_attribute({ update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_attribute(::Google::Cloud::Dataplex::V1::UpdateDataAttributeRequest.new(update_mask: update_mask, data_attribute: data_attribute, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_attribute_client_stub.call_rpc_count - end - end - - def test_delete_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_attribute({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_attribute name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_attribute ::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_attribute({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_attribute(::Google::Cloud::Dataplex::V1::DeleteDataAttributeRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_attribute_client_stub.call_rpc_count - end - end - - def test_list_data_attributes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListDataAttributesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_data_attributes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_attributes, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_attributes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_attributes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_attributes ::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_data_attributes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_data_attributes(::Google::Cloud::Dataplex::V1::ListDataAttributesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_data_attributes_client_stub.call_rpc_count - end - end - - def test_get_data_attribute - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::DataAttribute.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_attribute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_attribute, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_attribute_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_attribute({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_attribute name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_attribute ::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_attribute({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_attribute(::Google::Cloud::Dataplex::V1::GetDataAttributeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_data_attribute_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Client::Configuration, config - end - - def test_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::DataTaxonomyService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::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::DataTaxonomyService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::DataTaxonomyService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb deleted file mode 100644 index e934d9f6daa6..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# 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/service_pb" -require "google/cloud/dataplex/v1/service_services_pb" -require "google/cloud/dataplex/v1/dataplex_service" - -class ::Google::Cloud::Dataplex::V1::DataplexService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - 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::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, 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::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb deleted file mode 100644 index cd77e6ba10e9..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_paths_test.rb +++ /dev/null @@ -1,115 +0,0 @@ -# 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/dataplex_service" - -class ::Google::Cloud::Dataplex::V1::DataplexService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_asset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.asset_path project: "value0", location: "value1", lake: "value2", zone: "value3", asset: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/assets/value4", path - end - end - - def test_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.job_path project: "value0", location: "value1", lake: "value2", task: "value3", job: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3/jobs/value4", path - end - end - - def test_lake_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.lake_path project: "value0", location: "value1", lake: "value2" - assert_equal "projects/value0/locations/value1/lakes/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_task_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.task_path project: "value0", location: "value1", lake: "value2", task: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/tasks/value3", path - end - end - - def test_zone_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb deleted file mode 100644 index e4a4e31b4def..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_rest_test.rb +++ /dev/null @@ -1,1603 +0,0 @@ -# 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/service_pb" -require "google/cloud/dataplex/v1/dataplex_service/rest" - - -class ::Google::Cloud::Dataplex::V1::DataplexService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, 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_lake - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lake_id = "hello world" - lake = {} - validate_only = true - - create_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_lake_client_stub.call_count - end - end - end - - def test_update_lake - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - lake = {} - validate_only = true - - update_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_lake_client_stub.call_count - end - end - end - - def test_delete_lake - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_lake({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_lake name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_lake({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_lake_client_stub.call_count - end - end - end - - def test_list_lakes - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_lakes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lakes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lakes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_lakes_client_stub.call_count - end - end - end - - def test_get_lake - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Lake.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lake_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_lake({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_lake name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_lake({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_lake_client_stub.call_count - end - end - end - - def test_list_lake_actions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_lake_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_lake_actions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_lake_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_lake_actions_client_stub.call_count - end - end - end - - def test_create_zone - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - zone_id = "hello world" - zone = {} - validate_only = true - - create_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_zone_client_stub.call_count - end - end - end - - def test_update_zone - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - zone = {} - validate_only = true - - update_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_zone_client_stub.call_count - end - end - end - - def test_delete_zone - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_zone({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_zone name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_zone({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_zone_client_stub.call_count - end - end - end - - def test_list_zones - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_zones_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zones_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_zones_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_zones_client_stub.call_count - end - end - end - - def test_get_zone - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Zone.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_zone_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_zone({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_zone name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_zone({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_zone_client_stub.call_count - end - end - end - - def test_list_zone_actions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_zone_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_zone_actions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_zone_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_zone_actions_client_stub.call_count - end - end - end - - def test_create_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset_id = "hello world" - asset = {} - validate_only = true - - create_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_asset_client_stub.call_count - end - end - end - - def test_update_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - asset = {} - validate_only = true - - update_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_asset_client_stub.call_count - end - end - end - - def test_delete_asset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_asset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_asset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_asset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_asset_client_stub.call_count - end - end - end - - def test_list_assets - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_count - end - end - end - - def test_get_asset - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Asset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_asset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_asset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_asset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_asset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_asset_client_stub.call_count - end - end - end - - def test_list_asset_actions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_asset_actions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_asset_actions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_asset_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_asset_actions_client_stub.call_count - end - end - end - - def test_create_task - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task_id = "hello world" - task = {} - validate_only = true - - create_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_count - end - end - end - - def test_update_task - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - task = {} - validate_only = true - - update_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_task_client_stub.call_count - end - end - end - - def test_delete_task - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_count - end - end - end - - def test_list_tasks - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_tasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_tasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_count - end - end - end - - def test_get_task - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Task.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_task({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_task name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_task({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_count - end - end - end - - def test_list_jobs - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_jobs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_count - end - end - end - - def test_run_task - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - labels = {} - args = {} - - run_task_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_run_task_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_task({ name: name, labels: labels, args: args }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_task name: name, labels: labels, args: args do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_task({ name: name, labels: labels, args: args }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_count - end - end - end - - def test_get_job - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Job.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_count - end - end - end - - def test_cancel_job - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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_cancel_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_job({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_job name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_job({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_job_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb deleted file mode 100644 index bf74e307542b..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/dataplex_service_test.rb +++ /dev/null @@ -1,1876 +0,0 @@ -# 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/service_pb" -require "google/cloud/dataplex/v1/dataplex_service" - -class ::Google::Cloud::Dataplex::V1::DataplexService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - 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_lake - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - lake_id = "hello world" - lake = {} - validate_only = true - - create_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateLakeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["lake_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_lake parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_lake ::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_lake({ parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_lake(::Google::Cloud::Dataplex::V1::CreateLakeRequest.new(parent: parent, lake_id: lake_id, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_lake_client_stub.call_rpc_count - end - end - - def test_update_lake - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - lake = {} - validate_only = true - - update_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateLakeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Lake), request["lake"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_lake update_mask: update_mask, lake: lake, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_lake ::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_lake({ update_mask: update_mask, lake: lake, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_lake(::Google::Cloud::Dataplex::V1::UpdateLakeRequest.new(update_mask: update_mask, lake: lake, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_lake_client_stub.call_rpc_count - end - end - - def test_delete_lake - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteLakeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_lake({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_lake name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_lake ::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_lake({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_lake(::Google::Cloud::Dataplex::V1::DeleteLakeRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_lake_client_stub.call_rpc_count - end - end - - def test_list_lakes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListLakesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_lakes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lakes, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_lakes_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_lakes parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_lakes ::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_lakes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_lakes(::Google::Cloud::Dataplex::V1::ListLakesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_lakes_client_stub.call_rpc_count - end - end - - def test_get_lake - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Lake.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_lake_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_lake, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetLakeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_lake_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_lake({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_lake name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_lake ::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_lake({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_lake(::Google::Cloud::Dataplex::V1::GetLakeRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_lake_client_stub.call_rpc_count - end - end - - def test_list_lake_actions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_lake_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_lake_actions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_lake_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_lake_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_lake_actions ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_lake_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_lake_actions(::Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_lake_actions_client_stub.call_rpc_count - end - end - - def test_create_zone - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - zone_id = "hello world" - zone = {} - validate_only = true - - create_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateZoneRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["zone_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_zone parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_zone ::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_zone(::Google::Cloud::Dataplex::V1::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_zone_client_stub.call_rpc_count - end - end - - def test_update_zone - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - zone = {} - validate_only = true - - update_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateZoneRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Zone), request["zone"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_zone update_mask: update_mask, zone: zone, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_zone ::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_zone({ update_mask: update_mask, zone: zone, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_zone(::Google::Cloud::Dataplex::V1::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_zone_client_stub.call_rpc_count - end - end - - def test_delete_zone - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteZoneRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_zone({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_zone name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_zone ::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_zone({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_zone(::Google::Cloud::Dataplex::V1::DeleteZoneRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_zone_client_stub.call_rpc_count - end - end - - def test_list_zones - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListZonesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_zones_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_zones, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListZonesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_zones_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_zones parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_zones ::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_zones({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_zones(::Google::Cloud::Dataplex::V1::ListZonesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_zones_client_stub.call_rpc_count - end - end - - def test_get_zone - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Zone.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_zone, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetZoneRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_zone_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_zone({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_zone name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_zone ::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_zone({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_zone(::Google::Cloud::Dataplex::V1::GetZoneRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_zone_client_stub.call_rpc_count - end - end - - def test_list_zone_actions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_zone_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_zone_actions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_zone_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_zone_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_zone_actions ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_zone_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_zone_actions(::Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_zone_actions_client_stub.call_rpc_count - end - end - - def test_create_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - asset_id = "hello world" - asset = {} - validate_only = true - - create_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateAssetRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["asset_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_asset parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_asset ::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_asset({ parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_asset(::Google::Cloud::Dataplex::V1::CreateAssetRequest.new(parent: parent, asset_id: asset_id, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_asset_client_stub.call_rpc_count - end - end - - def test_update_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - asset = {} - validate_only = true - - update_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateAssetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Asset), request["asset"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_asset update_mask: update_mask, asset: asset, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_asset ::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_asset({ update_mask: update_mask, asset: asset, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_asset(::Google::Cloud::Dataplex::V1::UpdateAssetRequest.new(update_mask: update_mask, asset: asset, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_asset_client_stub.call_rpc_count - end - end - - def test_delete_asset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteAssetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_asset({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_asset name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_asset ::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_asset({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_asset(::Google::Cloud::Dataplex::V1::DeleteAssetRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_asset_client_stub.call_rpc_count - end - end - - def test_list_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assets, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_assets_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_assets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_assets ::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_assets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_assets(::Google::Cloud::Dataplex::V1::ListAssetsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_rpc_count - end - end - - def test_get_asset - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Asset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_asset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_asset, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetAssetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_asset_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_asset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_asset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_asset ::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_asset({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_asset(::Google::Cloud::Dataplex::V1::GetAssetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_asset_client_stub.call_rpc_count - end - end - - def test_list_asset_actions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListActionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_asset_actions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_asset_actions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_asset_actions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_asset_actions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_asset_actions ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_asset_actions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_asset_actions(::Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_asset_actions_client_stub.call_rpc_count - end - end - - def test_create_task - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - task_id = "hello world" - task = {} - validate_only = true - - create_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateTaskRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["task_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_task parent: parent, task_id: task_id, task: task, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_task ::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_task({ parent: parent, task_id: task_id, task: task, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_task(::Google::Cloud::Dataplex::V1::CreateTaskRequest.new(parent: parent, task_id: task_id, task: task, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_task_client_stub.call_rpc_count - end - end - - def test_update_task - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - task = {} - validate_only = true - - update_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateTaskRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Task), request["task"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_task update_mask: update_mask, task: task, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_task ::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_task({ update_mask: update_mask, task: task, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_task(::Google::Cloud::Dataplex::V1::UpdateTaskRequest.new(update_mask: update_mask, task: task, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_task_client_stub.call_rpc_count - end - end - - def test_delete_task - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_task({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_task name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_task ::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_task({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_task(::Google::Cloud::Dataplex::V1::DeleteTaskRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_task_client_stub.call_rpc_count - end - end - - def test_list_tasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListTasksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_tasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_tasks, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListTasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_tasks_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_tasks parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_tasks ::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_tasks({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_tasks(::Google::Cloud::Dataplex::V1::ListTasksRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_tasks_client_stub.call_rpc_count - end - end - - def test_get_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Task.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetTaskRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_task({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_task name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_task ::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_task({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_task(::Google::Cloud::Dataplex::V1::GetTaskRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_task_client_stub.call_rpc_count - end - end - - def test_list_jobs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListJobsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_jobs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_jobs, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListJobsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_jobs_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_jobs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_jobs ::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_jobs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_jobs(::Google::Cloud::Dataplex::V1::ListJobsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_jobs_client_stub.call_rpc_count - end - end - - def test_run_task - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::RunTaskResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - labels = {} - args = {} - - run_task_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_task, name - assert_kind_of ::Google::Cloud::Dataplex::V1::RunTaskRequest, request - assert_equal "hello world", request["name"] - assert_equal({}, request["labels"].to_h) - assert_equal({}, request["args"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_task_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_task({ name: name, labels: labels, args: args }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_task name: name, labels: labels, args: args do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_task ::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_task({ name: name, labels: labels, args: args }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_task(::Google::Cloud::Dataplex::V1::RunTaskRequest.new(name: name, labels: labels, args: args), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_task_client_stub.call_rpc_count - end - end - - def test_get_job - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Job.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_job ::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_job(::Google::Cloud::Dataplex::V1::GetJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_job_client_stub.call_rpc_count - end - end - - def test_cancel_job - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_job, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CancelJobRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_job_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_job({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_job name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_job ::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_job({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_job(::Google::Cloud::Dataplex::V1::CancelJobRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_job_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration, config - end - - def test_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::DataplexService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::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::DataplexService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Dataplex::V1::DataplexService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb deleted file mode 100644 index ca218c16a623..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# 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/metadata_service" - -class ::Google::Cloud::Dataplex::V1::MetadataService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_entity_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entity_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4", path - end - end - - def test_partition_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.partition_path project: "value0", location: "value1", lake: "value2", zone: "value3", entity: "value4", partition: "value5" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3/entities/value4/partitions/value5", path - end - end - - def test_zone_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.zone_path project: "value0", location: "value1", lake: "value2", zone: "value3" - assert_equal "projects/value0/locations/value1/lakes/value2/zones/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb deleted file mode 100644 index e7a54be21197..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_rest_test.rb +++ /dev/null @@ -1,600 +0,0 @@ -# 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/metadata_pb" -require "google/cloud/dataplex/v1/metadata_service/rest" - - -class ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, 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_entity - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entity = {} - validate_only = true - - create_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_create_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entity parent: parent, entity: entity, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entity_client_stub.call_count - end - end - end - - def test_update_entity - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entity = {} - validate_only = true - - update_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_update_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_entity({ entity: entity, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_entity entity: entity, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_entity({ entity: entity, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_entity_client_stub.call_count - end - end - end - - def test_delete_entity - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_delete_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_entity({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_entity name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_entity({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_entity_client_stub.call_count - end - end - end - - def test_get_entity - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Entity.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - - get_entity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_get_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entity({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entity name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entity({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entity_client_stub.call_count - end - end - end - - def test_list_entities - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_list_entities_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entities_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entities_client_stub.call_count - end - end - end - - def test_create_partition - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Partition.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - partition = {} - validate_only = true - - create_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_create_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_partition parent: parent, partition: partition, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_partition_client_stub.call_count - end - end - end - - def test_delete_partition - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_delete_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_partition({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_partition name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_partition({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_partition_client_stub.call_count - end - end - end - - def test_get_partition - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::Partition.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_get_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_partition({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_partition name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_partition({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_partition_client_stub.call_count - end - end - end - - def test_list_partitions - # Create test objects. - client_result = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_partitions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, 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::MetadataService::Rest::ServiceStub.stub :transcode_list_partitions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_partitions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_partitions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb deleted file mode 100644 index d9f493056dce..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/google/cloud/dataplex/v1/metadata_service_test.rb +++ /dev/null @@ -1,666 +0,0 @@ -# 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/metadata_pb" -require "google/cloud/dataplex/v1/metadata_service" - -class ::Google::Cloud::Dataplex::V1::MetadataService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - 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_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entity = {} - validate_only = true - - create_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreateEntityRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entity parent: parent, entity: entity, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entity ::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entity({ parent: parent, entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entity(::Google::Cloud::Dataplex::V1::CreateEntityRequest.new(parent: parent, entity: entity, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entity_client_stub.call_rpc_count - end - end - - def test_update_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entity = {} - validate_only = true - - update_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Entity), request["entity"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_entity({ entity: entity, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_entity entity: entity, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_entity ::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_entity({ entity: entity, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_entity(::Google::Cloud::Dataplex::V1::UpdateEntityRequest.new(entity: entity, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_entity_client_stub.call_rpc_count - end - end - - def test_delete_entity - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_entity({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_entity name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_entity ::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_entity({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_entity(::Google::Cloud::Dataplex::V1::DeleteEntityRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_entity_client_stub.call_rpc_count - end - end - - def test_get_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Entity.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - - get_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entity, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetEntityRequest, request - assert_equal "hello world", request["name"] - assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entity_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entity({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entity name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entity ::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entity({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entity(::Google::Cloud::Dataplex::V1::GetEntityRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entity_client_stub.call_rpc_count - end - end - - def test_list_entities - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListEntitiesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - view = :ENTITY_VIEW_UNSPECIFIED - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entities, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, request - assert_equal "hello world", request["parent"] - assert_equal :ENTITY_VIEW_UNSPECIFIED, request["view"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entities_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entities parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entities ::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entities({ parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entities(::Google::Cloud::Dataplex::V1::ListEntitiesRequest.new(parent: parent, view: view, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entities_client_stub.call_rpc_count - end - end - - def test_create_partition - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - partition = {} - validate_only = true - - create_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_partition, name - assert_kind_of ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataplex::V1::Partition), request["partition"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_partition parent: parent, partition: partition, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_partition ::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_partition({ parent: parent, partition: partition, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_partition(::Google::Cloud::Dataplex::V1::CreatePartitionRequest.new(parent: parent, partition: partition, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_partition_client_stub.call_rpc_count - end - end - - def test_delete_partition - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_partition, name - assert_kind_of ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_partition({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_partition name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_partition ::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_partition({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_partition(::Google::Cloud::Dataplex::V1::DeletePartitionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_partition_client_stub.call_rpc_count - end - end - - def test_get_partition - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::Partition.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_partition, name - assert_kind_of ::Google::Cloud::Dataplex::V1::GetPartitionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_partition_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_partition({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_partition name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_partition ::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_partition({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_partition(::Google::Cloud::Dataplex::V1::GetPartitionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_partition_client_stub.call_rpc_count - end - end - - def test_list_partitions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Dataplex::V1::ListPartitionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_partitions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_partitions, name - assert_kind_of ::Google::Cloud::Dataplex::V1::ListPartitionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_partitions_client_stub do - # Create client - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_partitions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_partitions ::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_partitions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_partitions(::Google::Cloud::Dataplex::V1::ListPartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_partitions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Client::Configuration, config - end - - 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::MetadataService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Dataplex::V1::MetadataService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb b/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-dataplex-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# 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 "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"